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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to