diff options
author | Valentin Schneider <[email protected]> | 2022-01-20 16:25:20 +0000 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2022-03-01 16:18:39 +0100 |
commit | 25795ef6299f07ce3838f3253a9cb34f64efcfae (patch) | |
tree | 8ca2a13144dc04b95650cccff0bd0ff6b5dc6814 /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | fa2c3254d7cfff5f7a916ab928a562d1165f17bb (diff) |
sched/tracing: Report TASK_RTLOCK_WAIT tasks as TASK_UNINTERRUPTIBLE
TASK_RTLOCK_WAIT currently isn't part of TASK_REPORT, thus a task blocking
on an rtlock will appear as having a task state == 0, IOW TASK_RUNNING.
The actual state is saved in p->saved_state, but reading it after reading
p->__state has a few issues:
o that could still be TASK_RUNNING in the case of e.g. rt_spin_lock
o ttwu_state_match() might have changed that to TASK_RUNNING
As pointed out by Eric, adding TASK_RTLOCK_WAIT to TASK_REPORT implies
exposing a new state to userspace tools which way not know what to do with
them. The only information that needs to be conveyed here is that a task is
waiting on an rt_mutex, which matches TASK_UNINTERRUPTIBLE - there's no
need for a new state.
Reported-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Valentin Schneider <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Steven Rostedt (Google) <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions