The patch titled Subject: mm-brk-downgrade-mmap_sem-to-read-when-shrinking-fix has been added to the -mm tree. Its filename is mm-brk-downgrade-mmap_sem-to-read-when-shrinking-fix.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-brk-downgrade-mmap_sem-to-read-when-shrinking-fix.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-brk-downgrade-mmap_sem-to-read-when-shrinking-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-brk-downgrade-mmap_sem-to-read-when-shrinking-fix tweak comment Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Laurent Dufour <ldufour@xxxxxxxxxxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/mm/mmap.c~mm-brk-downgrade-mmap_sem-to-read-when-shrinking-fix +++ a/mm/mmap.c @@ -243,9 +243,9 @@ SYSCALL_DEFINE1(brk, unsigned long, brk) */ if (brk <= mm->brk) { /* - * mm->brk need to be protected by write mmap_sem, update it - * before downgrading mmap_sem. - * When __do_munmap fail, it will be restored from origbrk. + * mm->brk must to be protected by write mmap_sem so update it + * before downgrading mmap_sem. When __do_munmap() fails, + * mm->brk will be restored from origbrk. */ mm->brk = brk; retval = __do_munmap(mm, newbrk, oldbrk-newbrk, &uf, true); _ Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are fix-crash-on-ocfs2_duplicate_clusters_by_page-v5-checkpatch-fixes.patch arm-arch-arm-include-asm-pageh-needs-personalityh.patch fix-clusters-leak-in-ocfs2_defrag_extent-fix.patch mm.patch mmpage_alloc-pf_wq_worker-threads-must-sleep-at-should_reclaim_retry-fix.patch sched-loadavg-consolidate-load_int-load_frac-calc_load-fix.patch mm-mremap-downgrade-mmap_sem-to-read-when-shrinking-fix.patch mm-brk-downgrade-mmap_sem-to-read-when-shrinking-fix.patch mm-calculate-deferred-pages-after-skipping-mirrored-memory-fix.patch list_lru-prefetch-neighboring-list-entries-before-acquiring-lock-fix.patch lib-bitmapc-fix-remaining-space-computation-in-bitmap_print_to_pagebuf-fix.patch lib-bitmapc-fix-remaining-space-computation-in-bitmap_print_to_pagebuf-fix-fix.patch ipc-allow-boot-time-extension-of-ipcmni-from-32k-to-8m-checkpatch-fixes.patch linux-next-rejects.patch kernel-forkc-export-kernel_thread-to-modules.patch slab-leaks3-default-y.patch