From: Jes Sorensen <jes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: [patch] don't double >> PAGE_SHIFT pointer for /dev/kmem access
Date: Wed, 25 Oct 2006 09:49:53 +0000 [thread overview]
Message-ID: <yq0ods07mim.fsf@jaguar.mkp.net> (raw)
Hi,
This one has been around for a while, but it's a pretty serious bug,
so if you would push it upstream quickly that would be great. Thanks
to Bjorn for spotting it.
Cheers,
Jes
Don't PAGE_SHIFT pointer before handing it to virt_to_page() in
xlate_dev_kmem_ptr() as it results in a double shift.
Spotted by Bjorn 'Eagleeye' Helgaas.
Signed-off-by: Jes Sorensen <jes@sgi.com>
---
include/asm-ia64/uaccess.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/include/asm-ia64/uaccess.h
=================================--- linux-2.6.orig/include/asm-ia64/uaccess.h
+++ linux-2.6/include/asm-ia64/uaccess.h
@@ -389,7 +389,7 @@ xlate_dev_kmem_ptr (char * p)
struct page *page;
char * ptr;
- page = virt_to_page((unsigned long)p >> PAGE_SHIFT);
+ page = virt_to_page((unsigned long)p);
if (PageUncached(page))
ptr = (char *)__pa(p) + __IA64_UNCACHED_OFFSET;
else
next reply other threads:[~2006-10-25 9:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-25 9:49 Jes Sorensen [this message]
2006-10-25 15:33 ` [patch] don't double >> PAGE_SHIFT pointer for /dev/kmem access Bjorn Helgaas
2006-10-26 22:00 ` Luck, Tony
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=yq0ods07mim.fsf@jaguar.mkp.net \
--to=jes@sgi.com \
--cc=linux-ia64@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