diff options
author | Marek Marczykowski <marmarek@mimuw.edu.pl> | 2011-05-03 12:04:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-07 12:31:51 -0800 |
commit | 10ae01e212fa102b65debed5b8ef7549917e605a (patch) | |
tree | eb6a7afa8baa28d869dbe37291d448039f63abc2 /drivers | |
parent | 141ec4b17b6744b06ee0516d187170a29a101560 (diff) | |
download | lwn-10ae01e212fa102b65debed5b8ef7549917e605a.tar.gz lwn-10ae01e212fa102b65debed5b8ef7549917e605a.zip |
xen-blkfront: fix data size for xenbus_gather in blkfront_connect
commit 4352b47ab7918108b389a48d2163c9a4c2aaf139 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: Marek Marczykowski <marmarek@mimuw.edu.pl>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
[v1: Changed title]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/xen-blkfront.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index b8578bb3f4c9..a2e8977abaad 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -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; |