From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Chen Gang <gang.chen@asianux.com>
Cc: Jan Beulich <JBeulich@suse.com>,
roger.pau@citrix.com, stefano.stabellini@eu.citrix.com,
dgdegra@tycho.nsa.gov, xen-devel <xen-devel@lists.xen.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized
Date: Fri, 1 Mar 2013 08:43:16 -0500 [thread overview]
Message-ID: <20130301134316.GA3733@phenom.dumpdata.com> (raw)
In-Reply-To: <512EC22F.5020404@asianux.com>
On Thu, Feb 28, 2013 at 10:34:23AM +0800, 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).
>
> additional information:
> before commit 01c681d4c70d64cb72142a2823f27c4146a02e63, the value printed
> here was bogus, as it was the guest provided value from req->u.rw.handle
> rather than the actual device.
applied with some changes to the description.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Acked-by: Jan Beulich <JBeulich@suse.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;
> }
>
> --
> 1.7.7.6
next prev parent reply other threads:[~2013-03-01 13:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 2:34 [PATCH v2] drivers/block/xen-blkback: preq.dev is used without initialized Chen Gang
2013-03-01 13:43 ` Konrad Rzeszutek Wilk [this message]
2013-03-05 0:54 ` Chen Gang
2013-04-03 12:56 ` William Dauchy
2013-04-03 13:01 ` Jan Beulich
2013-04-03 13:25 ` William Dauchy
2013-04-03 13:42 ` Jan Beulich
2013-04-03 13:56 ` William Dauchy
2013-04-03 14:34 ` Jan Beulich
2013-04-03 16:37 ` 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=20130301134316.GA3733@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=dgdegra@tycho.nsa.gov \
--cc=gang.chen@asianux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roger.pau@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox