diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2006-10-30 01:46:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-30 15:08:40 -0500 |
commit | 7259f0d05d595b73ef312a082e628627c6414969 (patch) | |
tree | 6227c5e3cd0c31fa80c7a35113007caaf70bf3b6 /include/linux | |
parent | 70812522b847bdb8fabee963191734f5fa3143f3 (diff) |
[PATCH] lockdep: annotate DECLARE_WAIT_QUEUE_HEAD
kernel: INFO: trying to register non-static key.
kernel: the code is fine but needs lockdep annotation.
kernel: turning off the locking correctness validator.
kernel: [<c04051ed>] show_trace_log_lvl+0x58/0x16a
kernel: [<c04057fa>] show_trace+0xd/0x10
kernel: [<c0405913>] dump_stack+0x19/0x1b
kernel: [<c043b1e2>] __lock_acquire+0xf0/0x90d
kernel: [<c043bf70>] lock_acquire+0x4b/0x6b
kernel: [<c061472f>] _spin_lock_irqsave+0x22/0x32
kernel: [<c04363d3>] prepare_to_wait+0x17/0x4b
kernel: [<f89a24b6>] lpfc_do_work+0xdd/0xcc2 [lpfc]
kernel: [<c04361b9>] kthread+0xc3/0xf2
kernel: [<c0402005>] kernel_thread_helper+0x5/0xb
Another case of non-static lockdep keys; duplicate the paradigm set by
DECLARE_COMPLETION_ONSTACK and introduce DECLARE_WAIT_QUEUE_HEAD_ONSTACK.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Greg KH <gregkh@suse.de>
Cc: Markus Lidel <markus.lidel@shadowconnect.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/wait.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/wait.h b/include/linux/wait.h index b3b9048421d8..e820d00e1383 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -79,6 +79,15 @@ struct task_struct; | |||
79 | 79 | ||
80 | extern void init_waitqueue_head(wait_queue_head_t *q); | 80 | extern void init_waitqueue_head(wait_queue_head_t *q); |
81 | 81 | ||
82 | #ifdef CONFIG_LOCKDEP | ||
83 | # define __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) \ | ||
84 | ({ init_waitqueue_head(&name); name; }) | ||
85 | # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) \ | ||
86 | wait_queue_head_t name = __WAIT_QUEUE_HEAD_INIT_ONSTACK(name) | ||
87 | #else | ||
88 | # define DECLARE_WAIT_QUEUE_HEAD_ONSTACK(name) DECLARE_WAIT_QUEUE_HEAD(name) | ||
89 | #endif | ||
90 | |||
82 | static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) | 91 | static inline void init_waitqueue_entry(wait_queue_t *q, struct task_struct *p) |
83 | { | 92 | { |
84 | q->flags = 0; | 93 | q->flags = 0; |