On Thu, 15 Jun 2017 23:48:38 +0200 Andrea Arcangeli <aarcange@xxxxxxxxxx> wrote: > Anon and hugetlbfs handle FOLL_DUMP set by get_dump_page() internally > to __get_user_pages(). > > shmem as opposed has no special FOLL_DUMP handling there so > handle_mm_fault() is invoked without mmap_sem and ends up calling > handle_userfault() that isn't expecting to be invoked without mmap_sem > held. > > This makes handle_userfault() fail immediately if invoked through > shmem_vm_ops->fault during coredumping and solves the problem. > > It's zero cost as we already had a check for current->flags to prevent > futex to trigger userfaults during exit (PF_EXITING). So what are the user-visible effects of the bug? Incomplete core files, I assume? Can we please get that description into the changelog so that others can decide which kernel(s) need the fix? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>