From: "Jan Beulich" <jbeulich@novell.com>
To: <linux-kernel@vger.kernel.org>
Cc: <James.Bottomley@HansenPartnership.com>
Subject: [PATCH] adjust size calculation for get_vm_area() in ioremap() context
Date: Tue, 22 Apr 2008 16:15:38 +0100 [thread overview]
Message-ID: <480E1D3A.76E4.0078.0@novell.com> (raw)
Short of getting a reply on the query why the argument of fls() here is
missing the decrement, here's a patch to add it (reducing the resulting
size when the incoming size is an exact power of two).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
---
mm/vmalloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.25/mm/vmalloc.c 2008-04-17 04:49:44.000000000 +0200
+++ 2.6.25-vm-ioremap-size/mm/vmalloc.c 2008-04-15 10:49:20.000000000 +0200
@@ -214,7 +214,7 @@ static struct vm_struct *__get_vm_area_n
BUG_ON(in_interrupt());
if (flags & VM_IOREMAP) {
- int bit = fls(size);
+ int bit = fls(size - 1);
if (bit > IOREMAP_MAX_ORDER)
bit = IOREMAP_MAX_ORDER;
next reply other threads:[~2008-04-22 15:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 15:15 Jan Beulich [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-01-10 16:39 Jan Beulich
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=480E1D3A.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome