aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Marczykowski <marmarek@mimuw.edu.pl>2011-05-03 12:04:52 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-05-12 08:55:51 -0400
commit4352b47ab7918108b389a48d2163c9a4c2aaf139 (patch)
tree0cff95e7f551f838de24c516d241449bfb4e07d3
parentedc83d47a9928281ecf6fb709753edb3c58ae7f1 (diff)
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>
-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 9cb8668ff5f..20759817ad5 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);
/*