lkml.org 
[lkml]   [2014]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: lockdep: strange %s#5 lock name
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)

\
 
 \ /
  Last update: 2014-02-10 21:01    [W:0.644 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site