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: Thu, 10 Jan 2008 16:39:55 +0000 [thread overview]
Message-ID: <4786586B.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.24-rc7/mm/vmalloc.c 2008-01-10 16:50:54.000000000 +0100
+++ 2.6.24-rc7-vm-ioremap-size/mm/vmalloc.c 2008-01-08 12:35:11.000000000 +0100
@@ -176,7 +176,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-01-10 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-10 16:39 Jan Beulich [this message]
2008-04-22 15:15 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=4786586B.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