]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/coredump: fix userspace coredump client detection
authorChristian Brauner <brauner@kernel.org>
Tue, 28 Oct 2025 08:46:00 +0000 (09:46 +0100)
committerChristian Brauner <brauner@kernel.org>
Tue, 4 Nov 2025 21:04:46 +0000 (22:04 +0100)
commit8b64f54c81d5baaef7fe117caa2f565be50ba440
treeb2a1b6aac172d39919107305eb32f07f074197ce
parent32ae9fa4063a7b4295e0c82d8f13bf3da6523e2d
selftests/coredump: fix userspace coredump client detection

PIDFD_INFO_COREDUMP is only retrievable until the task has exited. After
it has exited task->mm is NULL. So if the task didn't actually coredump
we can't retrieve it's dumpability settings anymore. Only if the task
did coredump will we have stashed the coredump information in the
respective struct pid.

Link: https://patch.msgid.link/20251028-work-coredump-signal-v1-15-ca449b7b7aa0@kernel.org
Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
tools/testing/selftests/coredump/coredump_socket_test.c