summaryrefslogtreecommitdiffstats
path: root/kernel/kcsan
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-06-11 10:28:12 +0200
committerPeter Zijlstra <peterz@infradead.org>2021-06-18 11:43:07 +0200
commitb03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6 (patch)
treeaa8a970bc1cf036c71a1c3201a0cd0ed8fb66636 /kernel/kcsan
parent37aadc687ab441bbcb693ddae613acf9afcea1ab (diff)
downloadlinux-stable-b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6.tar.gz
linux-stable-b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6.tar.bz2
linux-stable-b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6.zip
sched: Introduce task_is_running()
Replace a bunch of 'p->state == TASK_RUNNING' with a new helper: task_is_running(p). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Davidlohr Bueso <dave@stgolabs.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210611082838.222401495@infradead.org
Diffstat (limited to 'kernel/kcsan')
-rw-r--r--kernel/kcsan/report.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/kcsan/report.c b/kernel/kcsan/report.c
index 13dce3c664d6..56016e8e7461 100644
--- a/kernel/kcsan/report.c
+++ b/kernel/kcsan/report.c
@@ -460,7 +460,7 @@ static void set_other_info_task_blocking(unsigned long *flags,
* We may be instrumenting a code-path where current->state is already
* something other than TASK_RUNNING.
*/
- const bool is_running = current->state == TASK_RUNNING;
+ const bool is_running = task_is_running(current);
/*
* To avoid deadlock in case we are in an interrupt here and this is a
* race with a task on the same CPU (KCSAN_INTERRUPT_WATCHER), provide a