lkml.org 
[lkml]   [2000]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectBug in 2.4.0-test8: ramfs + highmem + patch
Hello,

using ramfs with highmem enabled (and ehough RAM ;) yields a possible
:Unable to handle kernel NULL pointer dereference at virtual address
00000000
:printing eip:
:c0166f88
[snip]

This is in asm/string.h: 518
called by fs/ramfs/inode.c:68

here page_address used to access the memory.
With the following patch I replaced it by kmap/kunmap.
This solved the problem for me:

--- 2.4.0-test8/fs/ramfs/inode.c Fri Aug 11 20:06:19 2000
+++ 2.4.0-test8-my/fs/ramfs/inode.c Sun Sep 10 19:48:59 2000
@@ -65,7 +65,8 @@
static int ramfs_readpage(struct file *file, struct page * page)
{
if (!Page_Uptodate(page)) {
- memset(page_address(page), 0, PAGE_CACHE_SIZE);
+ memset(kmap(page), 0, PAGE_CACHE_SIZE);
+ kunmap(page);
flush_dcache_page(page);
SetPageUptodate(page);
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.027 / U:0.092 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site