The patch titled Subject: mm-ksm-fix-null-pointer-dereference-when-ksm-zero-page-is-enabled-v4-fix has been added to the -mm tree. Its filename is mm-ksm-fix-null-pointer-dereference-when-ksm-zero-page-is-enabled-v4-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-ksm-fix-null-pointer-dereference-when-ksm-zero-page-is-enabled-v4-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-ksm-fix-null-pointer-dereference-when-ksm-zero-page-is-enabled-v4-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-ksm-fix-null-pointer-dereference-when-ksm-zero-page-is-enabled-v4-fix add the conventional brakes, replace /** with /* Cc: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx> Cc: Markus Elfring <Markus.Elfring@xxxxxx> Cc: Muchun Song <songmuchun@xxxxxxxxxxxxx> Cc: Xiongchun Duan <duanxiongchun@xxxxxxxxxxxxx> Cc: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/ksm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/mm/ksm.c~mm-ksm-fix-null-pointer-dereference-when-ksm-zero-page-is-enabled-v4-fix +++ a/mm/ksm.c @@ -2112,15 +2112,16 @@ static void cmp_and_merge_page(struct pa down_read(&mm->mmap_sem); vma = find_mergeable_vma(mm, rmap_item->address); - if (vma) + if (vma) { err = try_to_merge_one_page(vma, page, ZERO_PAGE(rmap_item->address)); - else - /** + } else { + /* * If the vma is out of date, we do not need to * continue. */ err = 0; + } up_read(&mm->mmap_sem); /* * In case of failure, the page was not really empty, so we _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are maintainers-add-an-entry-for-kfifo-fix.patch maintainers-add-an-entry-for-kfifo-fix-fix.patch mm-ksm-fix-null-pointer-dereference-when-ksm-zero-page-is-enabled-v4-fix.patch drivers-tty-serial-sh-scic-suppress-uninitialized-var-warning.patch mm.patch memcg-optimize-memorynuma_stat-like-memorystat-fix.patch mm-hugetlb-fix-a-typo-in-comment-manitained-maintained-v2-checkpatch-fixes.patch kernel-better-document-the-use_mm-unuse_mm-api-contract-fix.patch linux-next-fix.patch kernel-forkc-export-kernel_thread-to-modules.patch