Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pidfs: use guard() for task_lock

Use a guard().

Link: https://patch.msgid.link/20251028-work-coredump-signal-v1-1-ca449b7b7aa0@kernel.org
Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>

+1 -2
+1 -2
fs/pidfs.c
··· 356 356 return -ESRCH; 357 357 358 358 if ((kinfo.mask & PIDFD_INFO_COREDUMP) && !(kinfo.coredump_mask)) { 359 - task_lock(task); 359 + guard(task_lock)(task); 360 360 if (task->mm) { 361 361 unsigned long flags = __mm_flags_get_dumpable(task->mm); 362 362 363 363 kinfo.coredump_mask = pidfs_coredump_mask(flags); 364 364 } 365 - task_unlock(task); 366 365 } 367 366 368 367 /* Unconditionally return identifiers and credentials, the rest only on request */