Skip to contentSkip to conversation

kernel/hung_task: Use task_pid_nr function to get pid

PATCH New [email protected] 1 participant 1 message May 22, 2020 Hung task detector

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel/hung_task: Use task_pid_nr function to get pid

From: Zhang Qiang <[email protected]>

Use task_pid_nr(t) function instead of t->pid when printing task pid

---
 kernel/hung_task.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/hung_task.c +1 -1
index 14a625c16cb3..f397beb8c9e1 100644
@@ -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, " "),
Signature · 1 line
2.24.1