Skip to content

Commit

Permalink
xen-blkfront: fix data size for xenbus_gather in blkfront_connect
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Marczykowski authored and Konrad Rzeszutek Wilk committed May 12, 2011
1 parent edc83d4 commit 4352b47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down

0 comments on commit 4352b47

Please sign in to comment.