Re: Please back-port git commit196cfe2ae8fcdc03b3c7d627e7dfe8c0ce7229f9 and89153b5cae9f40c224a5d321665a97bf14220c2c to 3.0.x

From: Ian Campbell
Date: Sat Sep 03 2011 - 06:55:34 EST


On Wed, 2011-08-31 at 11:51 -0700, Greg KH wrote:
> On Wed, Aug 31, 2011 at 09:18:18AM +0100, Ian Campbell wrote:
> > On Mon, 2011-08-22 at 11:23 -0400, Konrad Rzeszutek Wilk wrote:
> > > Hey Greg,
> > >
> > > I've two patches that are in Linus's upstream kernel, but I neglected to
> > > put the stable@xxxxxxxxxx on them (duh!). Both Fedora and Ubuntu are carrying
> > > those two patches - but it would be nice if other distros got them.
> > >
> > > The two patches are:
> > >
> > > commit 196cfe2ae8fcdc03b3c7d627e7dfe8c0ce7229f9
> > > Author: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
> > > Date: Thu Jul 14 15:30:22 2011 +0200
> > >
> > > xen-blkfront: Drop name and minor adjustments for emulated scsi devices
> > >
> > > commit 89153b5cae9f40c224a5d321665a97bf14220c2c
> > > Author: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
> > > Date: Thu Jul 14 15:30:37 2011 +0200
> > >
> > > xen-blkfront: Fix one off warning about name clash
> > >
> > > Please back-port them to 3.0.x kernel. Thank
> >
> > On a related note having this in stable/longterm (including 2.6.32.y)
> > seems like a good idea? (it was already in the 3.0 baseline)
> >
> > commit 4352b47ab7918108b389a48d2163c9a4c2aaf139
> > Author: Marek Marczykowski <marmarek@xxxxxxxxxxxx>
> > Date: Tue May 3 12:04:52 2011 -0400
> >
> > 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@xxxxxxxxxxxx>
> > Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> > [v1: Changed title]
> > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
>
> It might, but it doesn't seem to apply to the .32 or .33-longterm
> kernels at all, so I would need a backported version to be able to apply
> it successfully.

This seems to do the trick.

Ian.

From 2a98f42bfd3308e429b6f03b3e5bce43b11bded8 Mon Sep 17 00:00:00 2001
From: Marek Marczykowski <marmarek@xxxxxxxxxxxx>
Date: Tue, 3 May 2011 12:04:52 -0400
Subject: [PATCH] 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@xxxxxxxxxxxx>
Acked-by: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
[v1: Changed title]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
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 b8578bb..a2e8977 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -889,7 +889,7 @@ static void blkfront_connect(struct blkfront_info *info)
}

err = xenbus_gather(XBT_NIL, info->xbdev->otherend,
- "feature-barrier", "%lu", &info->feature_barrier,
+ "feature-barrier", "%d", &info->feature_barrier,
NULL);
if (err)
info->feature_barrier = 0;
--
1.7.2.5


--
Ian Campbell


Please don't put a strain on our friendship by asking me to do something
for you.

Attachment: signature.asc
Description: This is a digitally signed message part