summaryrefslogtreecommitdiff
path: root/kernel/signal.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-06-11 11:28:12 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-06-18 12:43:07 +0300
commitb03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6 (patch)
treeaa8a970bc1cf036c71a1c3201a0cd0ed8fb66636 /kernel/signal.c
parent37aadc687ab441bbcb693ddae613acf9afcea1ab (diff)
downloadlinux-b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6.tar.xz
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/signal.c')
-rw-r--r--kernel/signal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index f7c6ffcbd044..5fc8fcf70c24 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -4719,7 +4719,7 @@ void kdb_send_sig(struct task_struct *t, int sig)
}
new_t = kdb_prev_t != t;
kdb_prev_t = t;
- if (t->state != TASK_RUNNING && new_t) {
+ if (!task_is_running(t) && new_t) {
spin_unlock(&t->sighand->siglock);
kdb_printf("Process is not RUNNING, sending a signal from "
"kdb risks deadlock\n"