Re: Linux 2.6.15-rc3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Krufky wrote:

Unable to handle kernel NULL pointer dereference at virtual address

EFLAGS: 00010202   (2.6.15-rc3) EIP is at vm_normal_page+0x17/0x60

Process gdb (pid: 5628, threadinfo=f488e000 task=f7239a30)

[<c014a8f5>] get_user_pages+0x29f/0x309

The clues point to the following patch. Can you give it a test
please?

Thanks,
Nick

--
SUSE Labs, Novell Inc.

vm_normal_page can be called with a NULL vma. This can be replaced with
gate_vma, and no problem because none of the gate vmas use VM_PFNMAP
(if they did they would need to set vm_pgoff).

Signed-off-by: Nick Piggin <[email protected]>

Index: linux-2.6/mm/memory.c
===================================================================
--- linux-2.6.orig/mm/memory.c
+++ linux-2.6/mm/memory.c
@@ -988,7 +988,8 @@ int get_user_pages(struct task_struct *t
 				return i ? : -EFAULT;
 			}
 			if (pages) {
-				struct page *page = vm_normal_page(vma, start, *pte);
+				struct page *page;
+				page = vm_normal_page(gate_vma, start, *pte);
 				pages[i] = page;
 				if (page)
 					get_page(page);

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux