From: Peter Zijlstra <peterz@infradead.org>
To: Tommi Rantala <tt.rantala@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>,
Dave Jones <davej@redhat.com>,
trinity@vger.kernel.org, tj@kernel.org
Subject: Re: lockdep: strange %s#5 lock name
Date: Mon, 10 Feb 2014 20:28:46 +0100 [thread overview]
Message-ID: <20140210192846.GF27965@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CA+ydwtqC7En++T5S7q5qzaDe_tf9dcMx3Y3aH=+Fcss_NU7stA@mail.gmail.com>
On Mon, Feb 10, 2014 at 09:19:43PM +0200, Tommi Rantala wrote:
> Hello,
>
> Noticed a suspicious "%s#5" lock name in a lockdep splat while fuzzing
> with trinity.
>
> [249844.531638] #0: (%s#5){.+.+.+}, at: [<ffffffff8115af70>]
> process_one_work+0x240/0x690
Lol.. its correct afaict:
struct workqueue_struct *__alloc_workqueue_key(const char *fmt,
unsigned int flags,
int max_active,
struct lock_class_key *key,
const char *lock_name, ...)
{
...
lockdep_init_map(&wq->lockdep_map, lock_name, key, 0);
So while its called lock_name, it looks like the argument is a format.
I suppose the below was what was intended...
---
kernel/workqueue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 82ef9f3b7473..861d8ddd92a2 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4202,7 +4202,7 @@ struct workqueue_struct *__alloc_workqueue_key(const char *fmt,
INIT_LIST_HEAD(&wq->flusher_overflow);
INIT_LIST_HEAD(&wq->maydays);
- lockdep_init_map(&wq->lockdep_map, lock_name, key, 0);
+ lockdep_init_map(&wq->lockdep_map, wq->name, key, 0);
INIT_LIST_HEAD(&wq->list);
if (alloc_and_link_pwqs(wq) < 0)
next prev parent reply other threads:[~2014-02-10 19:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 19:19 lockdep: strange %s#5 lock name Tommi Rantala
2014-02-10 19:28 ` Peter Zijlstra [this message]
2014-02-10 21:52 ` Tejun Heo
2014-02-11 11:00 ` Peter Zijlstra
2014-02-11 15:27 ` Tejun Heo
2014-02-13 4:35 ` Li Zhong
2014-02-13 21:26 ` Tejun Heo
2014-02-13 21:32 ` Peter Zijlstra
2014-02-13 22:15 ` Tejun Heo
2014-02-14 2:52 ` [PATCH ] workqueue: add args to workqueue lockdep name Li Zhong
2014-02-14 14:06 ` Tejun Heo
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=20140210192846.GF27965@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tj@kernel.org \
--cc=trinity@vger.kernel.org \
--cc=tt.rantala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.