[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211115165442.323611134@linuxfoundation.org>
Date: Mon, 15 Nov 2021 18:02:15 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Denis Kirjanov <kda@...ux-powerpc.org>,
Michael Ellerman <mpe@...erman.id.au>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.14 652/849] powerpc/xmon: fix task state output
From: Denis Kirjanov <kda@...ux-powerpc.org>
[ Upstream commit b1f896ce3542eb2eede5949ee2e481526fae1108 ]
p_state is unsigned since the commit 2f064a59a11f
The patch also uses TASK_RUNNING instead of null.
Fixes: 2f064a59a11f ("sched: Change task_struct::state")
Signed-off-by: Denis Kirjanov <kda@...ux-powerpc.org>
Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
Link: https://lore.kernel.org/r/20211026133108.7113-1-kda@linux-powerpc.org
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/powerpc/xmon/xmon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index da4d7f225a409..47518116e9533 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -3274,8 +3274,7 @@ static void show_task(struct task_struct *volatile tsk)
* appropriate for calling from xmon. This could be moved
* to a common, generic, routine used by both.
*/
- state = (p_state == 0) ? 'R' :
- (p_state < 0) ? 'U' :
+ state = (p_state == TASK_RUNNING) ? 'R' :
(p_state & TASK_UNINTERRUPTIBLE) ? 'D' :
(p_state & TASK_STOPPED) ? 'T' :
(p_state & TASK_TRACED) ? 'C' :
--
2.33.0
Powered by blists - more mailing lists