summaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorMarek Marczykowski <marmarek@mimuw.edu.pl>2011-05-03 18:04:52 +0200
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-05-12 14:55:51 +0200
commit4352b47ab7918108b389a48d2163c9a4c2aaf139 (patch)
tree0cff95e7f551f838de24c516d241449bfb4e07d3 /drivers/block/xen-blkfront.c
parentcciss: fix compile issue (diff)
downloadlinux-4352b47ab7918108b389a48d2163c9a4c2aaf139.tar.xz
linux-4352b47ab7918108b389a48d2163c9a4c2aaf139.zip
xen-blkfront: fix data size for xenbus_gather in blkfront_connect
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>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r--drivers/block/xen-blkfront.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 9cb8668ff5f4..20759817ad57 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1141,7 +1141,7 @@ static void blkfront_connect(struct blkfront_info *info)
}
err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
- "feature-barrier", "%lu", &barrier,
+ "feature-barrier", "%d", &barrier,
NULL);
/*