mbox series

[0/2] Fix for potential deadlock in pre-content event

Message ID 20250311114153.1763176-1-amir73il@gmail.com (mailing list archive)
Headers show
Series Fix for potential deadlock in pre-content event | expand

Message

Amir Goldstein March 11, 2025, 11:41 a.m. UTC
Jan,

This is the alternative solution proposed by Josef to solve the
deadlock.

I've added test coverage to mmap() pre-content events and verified
no pre-content events on page fault [1].

I went back and forward about allowing pre-content events on page fault
for __FMODE_EXEC and I have actually tested this variant, but because I
do not have test coverage for Josef's large executables use case and
because it is late in the rc cycle, I decided to disable pre-content
hooks in page faults temporarily, but leave the code in to allow Josef
the opportunity to re-enable the hooks for __FMODE_EXEC with a separate
patch after more testing.

Thanks,
Amir.

[1] https://github.com/amir73il/ltp/commits/fan_hsm/


Amir Goldstein (2):
  fsnotify: add pre-content hooks on mmap()
  fsnotify: avoid pre-content events when faulting in user pages

 include/linux/fsnotify.h | 11 ++++++++---
 mm/filemap.c             |  3 +--
 mm/mmap.c                | 12 ++++++++++++
 mm/util.c                |  7 +++++++
 4 files changed, 28 insertions(+), 5 deletions(-)