All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Dan Carpenter <error27@gmail.com>, joe.jin@oracle.com
Cc: Laszlo Ersek <lersek@redhat.com>,
	open list <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] xen-blkback: add missing return on error in
Date: Sat, 06 Aug 2011 14:46:52 +0000	[thread overview]
Message-ID: <20110806144652.GB29514@dumpdata.com> (raw)
In-Reply-To: <20110805141821.GK7659@shale.localdomain>

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@gmail.com>
> 
> 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;

WARNING: multiple messages have this Message-ID (diff)
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Dan Carpenter <error27@gmail.com>, joe.jin@oracle.com
Cc: Laszlo Ersek <lersek@redhat.com>, Joe Jin <joe.jin@oracle.com>,
	open list <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] xen-blkback: add missing return on error in xen_update_blkif_status()
Date: Sat, 6 Aug 2011 10:46:52 -0400	[thread overview]
Message-ID: <20110806144652.GB29514@dumpdata.com> (raw)
In-Reply-To: <20110805141821.GK7659@shale.localdomain>

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@gmail.com>
> 
> 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;

  parent reply	other threads:[~2011-08-06 14:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05 14:18 [patch] xen-blkback: add missing return on error in Dan Carpenter
2011-08-05 14:18 ` [patch] xen-blkback: add missing return on error in xen_update_blkif_status() Dan Carpenter
2011-08-05 15:05 ` Laszlo Ersek
2011-08-05 15:05   ` Laszlo Ersek
2011-08-06 14:46 ` Konrad Rzeszutek Wilk [this message]
2011-08-06 14:46   ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110806144652.GB29514@dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=error27@gmail.com \
    --cc=joe.jin@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=lersek@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.