Message ID | 20170712072506.3lzevgfwuzgs5u2s@mwanda (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, 12 Jul 2017, Dan Carpenter wrote: > We accidentally dereference "map" when it's NULL. > > Fixes: b535e2b9b78a ("xen/pvcalls: implement connect command") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Thanks! Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c > index d6c4c4aecb41..01b690e1e555 100644 > --- a/drivers/xen/pvcalls-back.c > +++ b/drivers/xen/pvcalls-back.c > @@ -424,7 +424,7 @@ static int pvcalls_back_connect(struct xenbus_device *dev, > sock); > if (!map) { > ret = -EFAULT; > - sock_release(map->sock); > + sock_release(sock); > } > > out: >
On 12/07/17 09:25, Dan Carpenter wrote: > We accidentally dereference "map" when it's NULL. > > Fixes: b535e2b9b78a ("xen/pvcalls: implement connect command") > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> The patch is okay, but the very same one has already been sent before. I'll take the first one. Juergen > > diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c > index d6c4c4aecb41..01b690e1e555 100644 > --- a/drivers/xen/pvcalls-back.c > +++ b/drivers/xen/pvcalls-back.c > @@ -424,7 +424,7 @@ static int pvcalls_back_connect(struct xenbus_device *dev, > sock); > if (!map) { > ret = -EFAULT; > - sock_release(map->sock); > + sock_release(sock); > } > > out: > >
diff --git a/drivers/xen/pvcalls-back.c b/drivers/xen/pvcalls-back.c index d6c4c4aecb41..01b690e1e555 100644 --- a/drivers/xen/pvcalls-back.c +++ b/drivers/xen/pvcalls-back.c @@ -424,7 +424,7 @@ static int pvcalls_back_connect(struct xenbus_device *dev, sock); if (!map) { ret = -EFAULT; - sock_release(map->sock); + sock_release(sock); } out:
We accidentally dereference "map" when it's NULL. Fixes: b535e2b9b78a ("xen/pvcalls: implement connect command") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>