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>
This commit is contained in:
Marek Marczykowski 2011-05-03 12:04:52 -04:00 коммит произвёл Konrad Rzeszutek Wilk
Родитель edc83d47a9
Коммит 4352b47ab7
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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);
/*