Re: [patch] xen-blkback: add missing return on error in xen_update_blkif_status()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 05, 2011 at 05:18:21PM +0300, Dan Carpenter wrote:
> We should return here after reporting the error.  Otherwise we'd hit
> a NULL deref of blkif->xenblkd on the next line.

Whao, yeah, I dropped that whole patchset. Will introduce it back
in when I get a better patchset from Joe.

Joe,
Can you add this fix in your patchqueue please?

> 
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>
> 
> diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
> index 32d4c3c..b750299 100644
> --- a/drivers/block/xen-blkback/xenbus.c
> +++ b/drivers/block/xen-blkback/xenbus.c
> @@ -107,6 +107,7 @@ static void xen_update_blkif_status(struct xen_blkif *blkif)
>  		err = PTR_ERR(blkif->xenblkd);
>  		blkif->xenblkd = NULL;
>  		xenbus_dev_error(blkif->be->dev, err, "start xenblkd");
> +		return;
>  	}
>  
>  	blkif->be->kthread_pid = blkif->xenblkd->pid;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux