lkml.org 
[lkml]   [2013]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drivers/block/xen-blkback: preq.dev is used without initialized
>>> On 27.02.13 at 05:52, Chen Gang <gang.chen@asianux.com> 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).
>
> 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





\
 
 \ /
  Last update: 2013-02-27 11:21    [W:0.058 / U:0.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site