]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] mremap pte_unmap NULL
authorHugh Dickins <hugh@veritas.com>
Tue, 4 May 2004 05:19:15 +0000 (22:19 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 4 May 2004 05:19:15 +0000 (22:19 -0700)
Old bug noone seems to have hit, but mremap's pte_unmap dst might be
NULL: would get preempt count wrong even when not DEBUG_HIGHMEM.

mm/mremap.c

index d4e99602531521fb9ce81da90cc7ceaf9533d4e9..9043076915f9719895a2ce778803e14b6b29ba17 100644 (file)
@@ -137,7 +137,8 @@ move_one_page(struct vm_area_struct *vma, unsigned long old_addr,
                                error = -ENOMEM;
                        pte_unmap_nested(src);
                }
-               pte_unmap(dst);
+               if (dst)
+                       pte_unmap(dst);
        }
        spin_unlock(&mm->page_table_lock);
        pte_chain_free(pte_chain);