diff --git a/[refs] b/[refs] index c0dd2b983634..583aea6f283e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 777c6c5f1f6e757ae49ecca2ed72d6b1f523c007 +refs/heads/master: ab92661d5d9514647346047f30f67a7f35ffea67 diff --git a/trunk/mm/memory.c b/trunk/mm/memory.c index 22bfa7a47a0b..baa999e87cd2 100644 --- a/trunk/mm/memory.c +++ b/trunk/mm/memory.c @@ -1999,7 +1999,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma, * Don't let another task, with possibly unlocked vma, * keep the mlocked page. */ - if (vma->vm_flags & VM_LOCKED) { + if ((vma->vm_flags & VM_LOCKED) && old_page) { lock_page(old_page); /* for LRU manipulation */ clear_page_mlock(old_page); unlock_page(old_page);