From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] blkfront: fix data size for xenbus_gather in, blkfront_connect Date: Tue, 3 May 2011 11:40:01 -0400 Message-ID: <20110503154001.GA9380@dumpdata.com> References: <4DBE902B.7050200@mimuw.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4DBE902B.7050200@mimuw.edu.pl> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Marek Marczykowski Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, May 02, 2011 at 01:06:19PM +0200, Marek Marczykowski wrote: > 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). Weird, I get this: konrad@phenom:~/work/linux$ patch -p1 < ~/for-40-blkfront patching file drivers/block/xen-blkfront.c patch: **** malformed patch at line 124: *info) Any ideas? Can you send the patch as attachment please? > > Signed-off-by: Marek Marczykowski > --- > 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 70f3b1b..6147a4e 100644 > --- a/drivers/block/xen-blkfront.c > +++ b/drivers/block/xen-blkfront.c > @@ -1151,7 +1151,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); > > /* > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel