WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] blkfront: fix data size for xenbus_gather in, bl

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] blkfront: fix data size for xenbus_gather in, blkfront_connect
From: Marek Marczykowski <marmarek@xxxxxxxxxxxx>
Date: Tue, 03 May 2011 17:43:44 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 03 May 2011 08:44:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20110503154001.GA9380@xxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4DBE902B.7050200@xxxxxxxxxxxx> <20110503154001.GA9380@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110421 Fedora/3.1.9-2.fc14 Lightning/1.0b3pre Thunderbird/3.1.9
On 03.05.2011 17:40, Konrad Rzeszutek Wilk wrote:
> 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? 

Ehh... my email client wrapped this line...

> Can you send the patch as attachment please?

Sure, attached.

>> Signed-off-by: Marek Marczykowski <marmarek@xxxxxxxxxxxx>
>> ---
>>  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@xxxxxxxxxxxxxxxxxxx
>> http://lists.xensource.com/xen-devel
> 


-- 
Pozdrawiam / Best Regards,
Marek Marczykowski         | RLU #390519
marmarek at mimuw edu pl   | xmpp:marmarek at staszic waw pl

Attachment: 0001-blkfront-fix-data-size-for-xenbus_gather-in-blkfront.patch
Description: Text document

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel