From: Marek Marczykowski <marmarek@mimuw.edu.pl>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] blkfront: fix data size for xenbus_gather in, blkfront_connect
Date: Tue, 03 May 2011 17:43:44 +0200 [thread overview]
Message-ID: <4DC022B0.4070407@mimuw.edu.pl> (raw)
In-Reply-To: <20110503154001.GA9380@dumpdata.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1652 bytes --]
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@mimuw.edu.pl>
>> ---
>> 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
>
--
Pozdrawiam / Best Regards,
Marek Marczykowski | RLU #390519
marmarek at mimuw edu pl | xmpp:marmarek at staszic waw pl
[-- Attachment #1.1.2: 0001-blkfront-fix-data-size-for-xenbus_gather-in-blkfront.patch --]
[-- Type: text/plain, Size: 1054 bytes --]
From e1ccf5d4a44013cd8828462d500f6d1a46358cff Mon Sep 17 00:00:00 2001
From: Marek Marczykowski <marmarek@mimuw.edu.pl>
Date: Mon, 2 May 2011 12:56:17 +0200
Subject: [PATCH] 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>
---
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);
/*
--
1.7.4.4
[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5842 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2011-05-03 15:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-02 11:06 [PATCH] blkfront: fix data size for xenbus_gather in, blkfront_connect Marek Marczykowski
2011-05-03 12:58 ` Ian Campbell
2011-05-03 15:40 ` Konrad Rzeszutek Wilk
2011-05-03 15:43 ` Ian Campbell
2011-05-03 15:43 ` Marek Marczykowski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DC022B0.4070407@mimuw.edu.pl \
--to=marmarek@mimuw.edu.pl \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).