mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <qiang.zhang@windriver.com>
To: <linux-kernel@vger.kernel.org>
Subject: [PATCH] kernel/hung_task: Use task_pid_nr function to get pid
Date: Fri, 22 May 2020 11:46:09 +0800	[thread overview]
Message-ID: <20200522034609.2048-1-qiang.zhang@windriver.com> (raw)

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


             reply	other threads:[~2020-05-22  3:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  3:46 qiang.zhang [this message]
2020-05-22  9:12 qiang.zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200522034609.2048-1-qiang.zhang@windriver.com \
    --to=qiang.zhang@windriver.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®