summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorChen Gang <gang.chen@asianux.com>2013-02-28 10:34:23 +0800
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2013-03-01 08:41:43 -0500
commita72d9002f80bffd7e4c7d60e5a9caa0cddffe894 (patch)
tree6182c152ac4dfc7227353096526318eed07267f6 /drivers/block
parent087ffecdaa1875cc683a7a5bc0695b3ebfce3bad (diff)
downloadop-kernel-dev-a72d9002f80bffd7e4c7d60e5a9caa0cddffe894.zip
op-kernel-dev-a72d9002f80bffd7e4c7d60e5a9caa0cddffe894.tar.gz
xen/xen-blkback: preq.dev is used without initialized
If call xen_vbd_translate failed, the preq.dev will be not initialized. Use blkif->vbd.pdevice instead (still better to print relative info). Note that before commit 01c681d4c70d64cb72142a2823f27c4146a02e63 (xen/blkback: Don't trust the handle from the frontend.) the value bogus, as it was the guest provided value from req->u.rw.handle rather than the actual device. Signed-off-by: Chen Gang <gang.chen@asianux.com> Acked-by: Jan Beulich <JBeulich@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/xen-blkback/blkback.c3
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;
}
OpenPOWER on IntegriCloud