[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <512DD6DA.5010706@citrix.com>
Date: Wed, 27 Feb 2013 10:50:18 +0100
From: Roger Pau Monné <roger.pau@...rix.com>
To: Chen Gang <gang.chen@...anux.com>
CC: "konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
"jbeulich@...e.com" <jbeulich@...e.com>,
Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
"dgdegra@...ho.nsa.gov" <dgdegra@...ho.nsa.gov>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers/block/xen-blkback: preq.dev is used without initialized
On 27/02/13 05:52, Chen Gang wrote:
>
> if call xen_vbd_translate failed, the preq.dev will be not initialized.
> so use blkif->vbd.pdevice instead (still better to print relative info).
preq.dev is initialized a a couple of lines prior to calling
xen_vbd_translate:
preq.dev = req->u.rw.handle;
> Signed-off-by: Chen Gang <gang.chen@...anux.com>
> ---
> drivers/block/xen-blkback/blkback.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
> index de1f319..6d1cc3d 100644
> --- a/drivers/block/xen-blkback/blkback.c
> +++ b/drivers/block/xen-blkback/blkback.c
> @@ -904,7 +904,8 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
> pr_debug(DRV_PFX "access denied: %s of [%llu,%llu] on dev=%04x\n",
> operation == READ ? "read" : "write",
> preq.sector_number,
> - preq.sector_number + preq.nr_sects, preq.dev);
> + preq.sector_number + preq.nr_sects,
> + blkif->vbd.pdevice);
> goto fail_response;
> }
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists