public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.9-rc2-mm2: devmem_is_allowed
@ 2004-09-23 22:37 Martin Diehl
  2004-09-24  6:40 ` Arjan van de Ven
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Diehl @ 2004-09-23 22:37 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel


Hi,

after switching from working 2.6.9-rc2 to -mm2, X refused to start on my 
testbox. It turned out this was because it failed (EPERM) reading from 
/dev/mem beyond the 1MB limit.

IMHO there is a typo in the test in devmem_is_allowed. The patch below 
fixed the issue for me. Despite I think it's pretty clear the logic there 
needs to be reverted, I'm somewhat uncertain because AFAICS nobody else 
complained so far - did I miss something?

Martin

-------------

diff -urp linux-2.6.9-rc2-mm2/arch/i386/mm/init.c v2.6.9-rc2-mm2-md/arch/i386/mm/init.c
--- linux-2.6.9-rc2-mm2/arch/i386/mm/init.c	Thu Sep 23 11:41:20 2004
+++ v2.6.9-rc2-mm2-md/arch/i386/mm/init.c	Fri Sep 24 00:13:26 2004
@@ -239,7 +239,7 @@ int devmem_is_allowed(unsigned long page
 {
 	if (pagenr <= 256)
 		return 1;
-	if (!page_is_ram(pagenr))
+	if (page_is_ram(pagenr))
 		return 1;
 	return 0;
 }


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-24  8:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-23 22:37 2.6.9-rc2-mm2: devmem_is_allowed Martin Diehl
2004-09-24  6:40 ` Arjan van de Ven
2004-09-24  8:09   ` Martin Diehl
2004-09-24  8:11     ` Arjan van de Ven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox