Files
erofs-linux/fs/notify/fanotify
AnonymeMeow 82c6dd2047 fanotify: allow reporting pidfds for reaped tasks
Fanotify used to refuse to report pidfds for reaped tasks by applying a
pid_has_task() check before calling pidfd_prepare(). This prevented
userspace from obtaining information about the task.

Register the event pid with pidfs when creating the fanotify event if
pidfd reporting was requested, so pidfd_prepare() can later create a
pidfd for the reaped task.

Suggested-by: Christian Brauner <[email protected]>
Link: https://lore.kernel.org/linux-fsdevel/20260528-schmuckvoll-heilen-garen-be77b4208671@brauner/
Signed-off-by: AnonymeMeow <[email protected]>
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jan Kara <[email protected]>
2026-06-10 11:08:23 +02:00
..
…