* [patch] don't double >> PAGE_SHIFT pointer for /dev/kmem access
@ 2006-10-25 9:49 Jes Sorensen
2006-10-25 15:33 ` Bjorn Helgaas
2006-10-26 22:00 ` Luck, Tony
0 siblings, 2 replies; 3+ messages in thread
From: Jes Sorensen @ 2006-10-25 9:49 UTC (permalink / raw)
To: linux-ia64
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] don't double >> PAGE_SHIFT pointer for /dev/kmem access
2006-10-25 9:49 [patch] don't double >> PAGE_SHIFT pointer for /dev/kmem access Jes Sorensen
@ 2006-10-25 15:33 ` Bjorn Helgaas
2006-10-26 22:00 ` Luck, Tony
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2006-10-25 15:33 UTC (permalink / raw)
To: linux-ia64
On Wednesday 25 October 2006 03:49, Jes Sorensen wrote:
> 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.
Bob Montgomery actually noticed it, so I can't take any credit for this :-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [patch] don't double >> PAGE_SHIFT pointer for /dev/kmem access
2006-10-25 9:49 [patch] don't double >> PAGE_SHIFT pointer for /dev/kmem access Jes Sorensen
2006-10-25 15:33 ` Bjorn Helgaas
@ 2006-10-26 22:00 ` Luck, Tony
1 sibling, 0 replies; 3+ messages in thread
From: Luck, Tony @ 2006-10-26 22:00 UTC (permalink / raw)
To: linux-ia64
> 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.
I'll push it up to Linus tomorrow. Thanks for the reminder.
-Tony
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-10-26 22:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-25 9:49 [patch] don't double >> PAGE_SHIFT pointer for /dev/kmem access Jes Sorensen
2006-10-25 15:33 ` Bjorn Helgaas
2006-10-26 22:00 ` Luck, Tony
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox