userfaultfd v4.11 updates
Status from this message: [merged] userfaultfd-selftest-vm-allow-to-build-in-vm-directory.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | userfaultfd: non-cooperative: fix fork fctx->new memleakfs/ | +9 | 3 replies | Applied |
| 2/3 | userfaultfd: non-cooperative: userfaultfd_remove revalidate vma in MADV_DONTNEEDfs/ include/ mm/ | +47 | 1 reply | Applied |
| 3/3 | userfaultfd: selftest: vm: allow to build in vm/ directorytools/ | +4 | 0 replies | Applied |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Mike Rapoport |
|---|---|
| 1/3 | |
| 2/3 | A-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] userfaultfd v4.11 updates
Hello,
this is incremental against current -mm.
The earlier patchset fixed the fctx->orig memleak but as I thought during review, there was a further leak in fctx->new and Mike promptly fixed it too. I've been running a reproducer and there's no further memleak when the uffd is closed by the parent while fork() blocks waiting for the event to be received.
In addition I found a potential stale pointer in MADV_DONTNEED if userfaultfd_remove has to block and releases the mmap_sem in the process. This patch revalidates the vma and fixes the race. Unfortunately calling userfaultfd_remove last is not ok as explained in the commit.
A "make" run from the directory selftests/vm/ independently started to fail in v4.11 trying to write executables to the root directory. That's not very friendly because it worked before, but it's easy to fix and the last patch corrects this behavior in the vm/Makefile.
Andrea Arcangeli (2):
userfaultfd: non-cooperative: userfaultfd_remove revalidate vma in
MADV_DONTNEED
userfaultfd: selftest: vm: allow to build in vm/ directory
Mike Rapoport (1):
userfaultfd: non-cooperative: fix fork fctx->new memleak
fs/userfaultfd.c | 18 ++++++++++----- include/linux/userfaultfd_k.h | 7 +++--- mm/madvise.c | 44 ++++++++++++++++++++++++++++++++++--- tools/testing/selftests/vm/Makefile | 4 ++++ 4 files changed, 60 insertions(+), 13 deletions(-)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>