]> git.baikalelectronics.ru Git - kernel.git/commit
xen/xen-blkback: preq.dev is used without initialized
authorChen Gang <gang.chen@asianux.com>
Thu, 28 Feb 2013 02:34:23 +0000 (10:34 +0800)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Fri, 1 Mar 2013 13:41:43 +0000 (08:41 -0500)
commit6455f950c2c816739fd04f529270406e17718bd6
tree6182c152ac4dfc7227353096526318eed07267f6
parentcd8b5c82654e57f5b713bb46ed49f95d653a2734
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 29f57ecd6b5ea6230b2e2e9c0500b80900cee661
(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>
drivers/block/xen-blkback/blkback.c