Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 13479d52 authored by Jeff Dike's avatar Jeff Dike Committed by Linus Torvalds
Browse files

[PATCH] uml: Page fault fixes



Any access to a PROT_NONE page should segfault the process.  A JVM seems to do
this on purpose.  Also, Al noticed some bogus code, which is now deleted.

Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Cc: <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ba9950c8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -57,10 +57,11 @@ int handle_page_fault(unsigned long address, unsigned long ip,
	*code_out = SEGV_ACCERR;
	if(is_write && !(vma->vm_flags & VM_WRITE)) 
		goto out;

        if(!(vma->vm_flags & (VM_READ | VM_EXEC)))
                goto out;

	page = address & PAGE_MASK;
	pgd = pgd_offset(mm, page);
	pud = pud_offset(pgd, page);
	pmd = pmd_offset(pud, page);
	do {
 survive:
		switch (handle_mm_fault(mm, vma, address, is_write)){