public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
To: mingo@elte.hu, peterz@infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] sched.c: call debug_show_all_locks when dumping all tasks
Date: Wed, 25 Nov 2009 15:23:41 +0200	[thread overview]
Message-ID: <4b0d2fe4.0ab6660a.6437.3cfc@mx.google.com> (raw)

show_state_filter() failed to call debug_show_all_locks() when specified to
dump all tasks.
Fix: call debug_show_all_locks() when !state_filter (since !state_filter
means "all tasks").

Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
---
In commit 39bc89fd4019b164002adaacef92c4140e37955a the interface of
show_state_filter() was changed: zero valued 'state_filter' specifies "dump all
tasks" (instead of -1).
However, the condition for calling debug_show_all_locks() ("show locks if all
tasks are dumped") was not updated accordingly.

diff --git a/kernel/sched.c b/kernel/sched.c
index 3c11ae0..6e2b936 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6935,7 +6935,7 @@ void show_state_filter(unsigned long state_filter)
 	/*
 	 * Only show locks if all tasks are dumped:
 	 */
-	if (state_filter == -1)
+	if (!state_filter)
 		debug_show_all_locks();
 }

-- 
Shmulik Ladkani

             reply	other threads:[~2009-11-25 13:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-25 13:23 Shmulik Ladkani [this message]
2009-11-25 13:30 ` [tip:sched/core] sched.c: Call debug_show_all_locks() when dumping all tasks tip-bot for Shmulik Ladkani

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=4b0d2fe4.0ab6660a.6437.3cfc@mx.google.com \
    --to=shmulik.ladkani@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.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