Re: [PATCH v3 0/2] fanotify: lift pidfd reporting restrictions

From: Jan Kara

Date: Mon Jun 08 2026 - 07:06:57 EST


On Sat 30-05-26 09:37:30, AnonymeMeow wrote:
> The pidfd API now supports pidfds for tasks that are not thread group leaders,
> but fanotify has not caught up yet. This patch set lifts that restriction and
> allows fanotify to report pidfds referring the event-generating thread.
>
> Additionally, this patch set drops the pid_has_task() check before the
> pidfd_prepare() call, allowing fanotify to hand out pidfds for reaped tasks,
> as suggested by Christian.
>
> Link: https://lore.kernel.org/lkml/20260528-schmuckvoll-heilen-garen-be77b4208671@brauner/
>
> changes since v2:
> - Split the two independent changes into separate patches.
>
> v2: https://lore.kernel.org/lkml/20260529020035.17477-1-anonymemeow@xxxxxxxxx/

OK, I have taken these patches into my tree now. Can you please send fixes
for LTP tests fanotify20 and fanotify21?

Honza

>
> AnonymeMeow (2):
> fanotify: report thread pidfds for FAN_REPORT_TID
> fanotify: allow reporting pidfds for reaped tasks
>
> fs/notify/fanotify/fanotify_user.c | 33 +++++++-----------------------
> 1 file changed, 7 insertions(+), 26 deletions(-)
>
> --
> 2.54.0
>
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR