Commit 10ae01e2 authored by Marek Marczykowski's avatar Marek Marczykowski Committed by Greg Kroah-Hartman

xen-blkfront: fix data size for xenbus_gather in blkfront_connect

commit 4352b47a upstream.

barrier variable is int, not long. This overflow caused another variable
override: "err" (in PV code) and "binfo" (in xenlinux code -
drivers/xen/blkfront/blkfront.c). The later caused incorrect device
flags (RO/removable etc).
Signed-off-by: default avatarMarek Marczykowski <marmarek@mimuw.edu.pl>
Acked-by: default avatarIan Campbell <Ian.Campbell@citrix.com>
[v1: Changed title]
Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 141ec4b1
......@@ -889,7 +889,7 @@ static void blkfront_connect(struct blkfront_info *info)
}
err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
"feature-barrier", "%lu", &info->feature_barrier,
"feature-barrier", "%d", &info->feature_barrier,
NULL);
if (err)
info->feature_barrier = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment