* [PATCH] kernel/hung_task: Use task_pid_nr function to get pid
@ 2020-05-22 9:12 qiang.zhang
0 siblings, 0 replies; 2+ messages in thread
From: qiang.zhang @ 2020-05-22 9:12 UTC (permalink / raw)
To: linux-kernel
From: Zhang Qiang <qiang.zhang@windriver.com>
Use task_pid_nr(t) function instead of t->pid when printing
task pid.
Signed-off-by: Zhang Qiang <qiang.zhang@windriver.com>
---
kernel/hung_task.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 14a625c16cb3..0a77f6af6909 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -128,7 +128,8 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
if (sysctl_hung_task_warnings > 0)
sysctl_hung_task_warnings--;
pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n",
- t->comm, t->pid, (jiffies - t->last_switch_time) / HZ);
+ t->comm, task_pid_nr(t),
+ (jiffies - t->last_switch_time) / HZ);
pr_err(" %s %s %.*s\n",
print_tainted(), init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] kernel/hung_task: Use task_pid_nr function to get pid
@ 2020-05-22 3:46 qiang.zhang
0 siblings, 0 replies; 2+ messages in thread
From: qiang.zhang @ 2020-05-22 3:46 UTC (permalink / raw)
To: linux-kernel
From: Zhang Qiang <qiang.zhang@windriver.com>
Use task_pid_nr(t) function instead of t->pid when printing
task pid
Signed-off-by: Zhang Qiang <qiang.zhang@windriver.com>
---
kernel/hung_task.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/hung_task.c b/kernel/hung_task.c
index 14a625c16cb3..f397beb8c9e1 100644
--- a/kernel/hung_task.c
+++ b/kernel/hung_task.c
@@ -128,7 +128,7 @@ static void check_hung_task(struct task_struct *t, unsigned long timeout)
if (sysctl_hung_task_warnings > 0)
sysctl_hung_task_warnings--;
pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n",
- t->comm, t->pid, (jiffies - t->last_switch_time) / HZ);
+ t->comm, task_pid_nr(t), (jiffies - t->last_switch_time) / HZ);
pr_err(" %s %s %.*s\n",
print_tainted(), init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
--
2.24.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-22 9:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 9:12 [PATCH] kernel/hung_task: Use task_pid_nr function to get pid qiang.zhang
-- strict thread matches above, loose matches on Subject: below --
2020-05-22 3:46 qiang.zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).