The patch titled Subject: mm-reuse-only-pte-mapped-ksm-page-in-do_wp_page-fix has been added to the -mm tree. Its filename is mm-reuse-only-pte-mapped-ksm-page-in-do_wp_page-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-reuse-only-pte-mapped-ksm-page-in-do_wp_page-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-reuse-only-pte-mapped-ksm-page-in-do_wp_page-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Subject: mm-reuse-only-pte-mapped-ksm-page-in-do_wp_page-fix replace BUG_ON()s with WARN_ON()s Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: Christian Koenig <christian.koenig@xxxxxxx> Cc: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxxxxxxx> Cc: Huang Ying <ying.huang@xxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx> Cc: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> Cc: Minchan Kim <minchan@xxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxxx> Cc: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/ksm.c~mm-reuse-only-pte-mapped-ksm-page-in-do_wp_page-fix +++ a/mm/ksm.c @@ -2649,9 +2649,14 @@ bool reuse_ksm_page(struct page *page, struct vm_area_struct *vma, unsigned long address) { - VM_BUG_ON_PAGE(is_zero_pfn(page_to_pfn(page)), page); - VM_BUG_ON_PAGE(!page_mapped(page), page); - VM_BUG_ON_PAGE(!PageLocked(page), page); +#ifdef CONFIG_DEBUG_VM + if (WARN_ON(is_zero_pfn(page_to_pfn(page))) || + WARN_ON(!page_mapped(page)) || + WARN_ON(!PageLocked(page))) { + dump_page(page, "reuse_ksm_page"); + return false; + } +#endif if (PageSwapCache(page) || !page_stable_node(page)) return false; _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are arm-arch-arm-include-asm-pageh-needs-personalityh.patch ocfs2-clear-zero-in-unaligned-direct-io-checkpatch-fixes.patch mm.patch mm-use-common-iterator-for-deferred_init_pages-and-deferred_free_pages-fix.patch filemap-kill-page_cache_read-usage-in-filemap_fault-fix.patch filemap-drop-the-mmap_sem-for-all-blocking-operations-checkpatch-fixes.patch memory_hotplug-free-pages-as-higher-order-fix.patch memory_hotplug-free-pages-as-higher-order-fix-fix.patch fs-epoll-deal-with-wait_queue-only-once-fix.patch autofs-improve-ioctl-sbi-checks-fix.patch exec-separate-mm_anonpages-and-rlimit_stack-accounting-checkpatch-fixes.patch ipc-allow-boot-time-extension-of-ipcmni-from-32k-to-8m-checkpatch-fixes.patch scripts-atomic-check-atomicssh-dont-assume-that-scripts-are-executable.patch mm-treewide-remove-unused-address-argument-from-pte_alloc-functions-v2-fix.patch mm-convert-pg_balloon-to-pg_offline-fix.patch fs-remove-caller-signal_pending-branch-predictions-fix.patch mm-reuse-only-pte-mapped-ksm-page-in-do_wp_page-fix.patch kernel-forkc-export-kernel_thread-to-modules.patch slab-leaks3-default-y.patch