summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorDavid Hildenbrand (Arm) <david@kernel.org>2026-10-31 10:39:52 +0100
committerDavid Hildenbrand (Arm) <david@kernel.org>2026-11-03 20:20:52 +0100
commit35f7ecd55ce7e51cb6d5ef49e6dd51f3c80f61e4 (patch)
tree65fe0e71826939f66f2d1c9fb9c08d412696eb5c /tools/lib/python
parent21a3888d3d2f87b7f15ccea1f0befd57346fe899 (diff)
mm/userfaultfd: write-lock the VMA before waking waiters when unregistering
userfaultfd_unregister() wakes pending missing faults before clearing the VMA's userfaultfd registration. With per-VMA fault locking, holding mmap_lock for write does not prevent another fault from queuing after the wakeup but before userfaultfd_clear_vma() write-locks the VMA. That waiter can then remain asleep indefinitely. Call vma_start_write() before waking waiters. Existing fault handlers queue themselves before dropping the VMA read lock, and new readers are excluded until mmap_write_unlock(). Fixes: 29a22b9e08d7 ("mm: handle userfaults under VMA lock") Cc: stable@vger.kernel.org Reported-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Tested-by: Muhammad Usama Anjum <usama.anjum@arm.com> Link: https://patch.msgid.link/20261031-fixes_core-v3-23-d6437171ecc3@kernel.org Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions