aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/lockdep.c')
-rw-r--r--kernel/lockdep.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 022d2ed7fd8b..3673a3f44d9d 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2260,7 +2260,7 @@ void trace_softirqs_off(unsigned long ip)
2260 debug_atomic_inc(&redundant_softirqs_off); 2260 debug_atomic_inc(&redundant_softirqs_off);
2261} 2261}
2262 2262
2263void lockdep_trace_alloc(gfp_t gfp_mask) 2263static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)
2264{ 2264{
2265 struct task_struct *curr = current; 2265 struct task_struct *curr = current;
2266 2266
@@ -2279,12 +2279,29 @@ void lockdep_trace_alloc(gfp_t gfp_mask)
2279 if (!(gfp_mask & __GFP_FS)) 2279 if (!(gfp_mask & __GFP_FS))
2280 return; 2280 return;
2281 2281
2282 if (DEBUG_LOCKS_WARN_ON(irqs_disabled())) 2282 if (DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)))
2283 return; 2283 return;
2284 2284
2285 mark_held_locks(curr, RECLAIM_FS); 2285 mark_held_locks(curr, RECLAIM_FS);
2286} 2286}
2287 2287
2288static void check_flags(unsigned long flags);
2289
2290void lockdep_trace_alloc(gfp_t gfp_mask)
2291{
2292 unsigned long flags;
2293
2294 if (unlikely(current->lockdep_recursion))
2295 return;
2296
2297 raw_local_irq_save(flags);
2298 check_flags(flags);
2299 current->lockdep_recursion = 1;
2300 __lockdep_trace_alloc(gfp_mask, flags);
2301 current->lockdep_recursion = 0;
2302 raw_local_irq_restore(flags);
2303}
2304
2288static int mark_irqflags(struct task_struct *curr, struct held_lock *hlock) 2305static int mark_irqflags(struct task_struct *curr, struct held_lock *hlock)
2289{ 2306{
2290 /* 2307 /*