diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-03-31 07:53:43 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-31 07:53:43 -0400 |
commit | 7bee946358c3cb957d4aa648fc5ab3cad0b232d0 (patch) | |
tree | 693061ebde2abc35ecc846e5084630d7225aaaff /kernel/lockdep.c | |
parent | d820ac4c2fa881079e6b689d2098adce337558ae (diff) | |
parent | 15f7176eb1cccec0a332541285ee752b935c1c85 (diff) |
Merge branch 'linus' into locking-for-linus
Conflicts:
lib/Kconfig.debug
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r-- | kernel/lockdep.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c index 9a1e2bcc4b8d..981cd4854281 100644 --- a/kernel/lockdep.c +++ b/kernel/lockdep.c | |||
@@ -2254,7 +2254,7 @@ void trace_softirqs_off(unsigned long ip) | |||
2254 | debug_atomic_inc(&redundant_softirqs_off); | 2254 | debug_atomic_inc(&redundant_softirqs_off); |
2255 | } | 2255 | } |
2256 | 2256 | ||
2257 | void lockdep_trace_alloc(gfp_t gfp_mask) | 2257 | static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags) |
2258 | { | 2258 | { |
2259 | struct task_struct *curr = current; | 2259 | struct task_struct *curr = current; |
2260 | 2260 | ||
@@ -2273,12 +2273,29 @@ void lockdep_trace_alloc(gfp_t gfp_mask) | |||
2273 | if (!(gfp_mask & __GFP_FS)) | 2273 | if (!(gfp_mask & __GFP_FS)) |
2274 | return; | 2274 | return; |
2275 | 2275 | ||
2276 | if (DEBUG_LOCKS_WARN_ON(irqs_disabled())) | 2276 | if (DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags))) |
2277 | return; | 2277 | return; |
2278 | 2278 | ||
2279 | mark_held_locks(curr, RECLAIM_FS); | 2279 | mark_held_locks(curr, RECLAIM_FS); |
2280 | } | 2280 | } |
2281 | 2281 | ||
2282 | static void check_flags(unsigned long flags); | ||
2283 | |||
2284 | void lockdep_trace_alloc(gfp_t gfp_mask) | ||
2285 | { | ||
2286 | unsigned long flags; | ||
2287 | |||
2288 | if (unlikely(current->lockdep_recursion)) | ||
2289 | return; | ||
2290 | |||
2291 | raw_local_irq_save(flags); | ||
2292 | check_flags(flags); | ||
2293 | current->lockdep_recursion = 1; | ||
2294 | __lockdep_trace_alloc(gfp_mask, flags); | ||
2295 | current->lockdep_recursion = 0; | ||
2296 | raw_local_irq_restore(flags); | ||
2297 | } | ||
2298 | |||
2282 | static int mark_irqflags(struct task_struct *curr, struct held_lock *hlock) | 2299 | static int mark_irqflags(struct task_struct *curr, struct held_lock *hlock) |
2283 | { | 2300 | { |
2284 | /* | 2301 | /* |