mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] debug: workqueue locking sanity
Workqueue functions should not leak locks, assert so, printing the last function ran. Use macros in lockdep.h to avoid include dependency pains. [akpm@osdl.org: build fix] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
6fb50ea79c
commit
d5abe66917
2 changed files with 18 additions and 0 deletions
|
@ -243,6 +243,8 @@ extern void lock_release(struct lockdep_map *lock, int nested,
|
|||
|
||||
# define INIT_LOCKDEP .lockdep_recursion = 0,
|
||||
|
||||
#define lockdep_depth(tsk) ((tsk)->lockdep_depth)
|
||||
|
||||
#else /* !LOCKDEP */
|
||||
|
||||
static inline void lockdep_off(void)
|
||||
|
@ -277,6 +279,9 @@ static inline int lockdep_internal(void)
|
|||
* The class key takes no space if lockdep is disabled:
|
||||
*/
|
||||
struct lock_class_key { };
|
||||
|
||||
#define lockdep_depth(tsk) (0)
|
||||
|
||||
#endif /* !LOCKDEP */
|
||||
|
||||
#if defined(CONFIG_TRACE_IRQFLAGS) && defined(CONFIG_GENERIC_HARDIRQS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue