diff options
author | Tycho Andersen <[email protected]> | 2024-02-07 10:19:29 +0100 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2024-02-07 12:09:44 +0100 |
commit | 0c9bd6bc4bb2ecfe8ce12e9a77ccd762dabe18b4 (patch) | |
tree | 1dbd5b043ffe82884c4e95b1c7aa9bd8afef273e /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 83b290c9e3b5d95891f43a4aeadf6071cbff25d3 (diff) |
pidfd: getfd should always report ESRCH if a task is exiting
We can get EBADF from pidfd_getfd() if a task is currently exiting,
which might be confusing. Let's check PF_EXITING, and just report ESRCH
if so.
I chose PF_EXITING, because it is set in exit_signals(), which is called
before exit_files(). Since ->exit_status is mostly set after
exit_files() in exit_notify(), using that still leaves a window open for
the race.
Reviewed-by: Oleg Nesterov <[email protected]>
Signed-off-by: Tycho Andersen <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions