From: Ingo Molnar <mingo@elte.hu>
To: qinghuang feng <qhfeng.kernel@gmail.com>
Cc: sniper <s3c24xx@gmail.com>,
mingo@redhat.com, peterz@infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] LOCKDEP: minor fix for debug_show_all_locks()
Date: Tue, 28 Oct 2008 10:31:21 +0100 [thread overview]
Message-ID: <20081028093121.GU15734@elte.hu> (raw)
In-Reply-To: <21d34cad0810280224t7382c419k95ff89750caef6b2@mail.gmail.com>
* qinghuang feng <qhfeng.kernel@gmail.com> wrote:
> When we failed to get tasklist_lock eventually (count equals 0),
> we should only print " ignoring it.\n", and not print
> " locked it.\n" needlessly.
>
> Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
> ---
> diff --git a/kernel/lockdep.c b/kernel/lockdep.c
> index dbda475..6533fd9 100644
> --- a/kernel/lockdep.c
> +++ b/kernel/lockdep.c
> @@ -3417,8 +3417,7 @@ retry:
> }
> printk(" ignoring it.\n");
> unlock = 0;
> - }
> - if (count != 10)
> + } else if (count != 10)
> printk(" locked it.\n");
>
applied to tip/core/urgent, thanks!
note that i've done two small tweaks to the patch:
- added curly braces to the else branch as well - the convention is
to mirror the curly braces of the main branch in such cases.
- added KERN_CONT for the printk
Ingo
-------------->
>From 46fec7ac40e452a2ea5e63648d98b6bb2b5898f9 Mon Sep 17 00:00:00 2001
From: qinghuang feng <qhfeng.kernel@gmail.com>
Date: Tue, 28 Oct 2008 17:24:28 +0800
Subject: [PATCH] lockdep: minor fix for debug_show_all_locks()
When we failed to get tasklist_lock eventually (count equals 0),
we should only print " ignoring it.\n", and not print
" locked it.\n" needlessly.
Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/lockdep.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index dbda475..11832ac 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -3417,9 +3417,10 @@ retry:
}
printk(" ignoring it.\n");
unlock = 0;
+ } else {
+ if (count != 10)
+ printk(KERN_CONT " locked it.\n");
}
- if (count != 10)
- printk(" locked it.\n");
do_each_thread(g, p) {
/*
prev parent reply other threads:[~2008-10-28 9:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 20:03 sniper
2008-10-28 8:29 ` Ingo Molnar
2008-10-28 9:24 ` qinghuang feng
2008-10-28 9:31 ` Ingo Molnar [this message]
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=20081028093121.GU15734@elte.hu \
--to=mingo@elte.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=qhfeng.kernel@gmail.com \
--cc=s3c24xx@gmail.com \
/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
Powered by JetHome