summaryrefslogtreecommitdiffstats
path: root/kernel/lockdep.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-31 13:53:43 +0200
committerIngo Molnar <mingo@elte.hu>2009-03-31 13:53:43 +0200
commit7bee946358c3cb957d4aa648fc5ab3cad0b232d0 (patch)
tree693061ebde2abc35ecc846e5084630d7225aaaff /kernel/lockdep.c
parentd820ac4c2fa881079e6b689d2098adce337558ae (diff)
parent15f7176eb1cccec0a332541285ee752b935c1c85 (diff)
downloadop-kernel-dev-7bee946358c3cb957d4aa648fc5ab3cad0b232d0.zip
op-kernel-dev-7bee946358c3cb957d4aa648fc5ab3cad0b232d0.tar.gz
Merge branch 'linus' into locking-for-linus
Conflicts: lib/Kconfig.debug
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 9a1e2bc..981cd48 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2254,7 +2254,7 @@ void trace_softirqs_off(unsigned long ip)
debug_atomic_inc(&redundant_softirqs_off);
}
-void lockdep_trace_alloc(gfp_t gfp_mask)
+static void __lockdep_trace_alloc(gfp_t gfp_mask, unsigned long flags)
{
struct task_struct *curr = current;
@@ -2273,12 +2273,29 @@ void lockdep_trace_alloc(gfp_t gfp_mask)
if (!(gfp_mask & __GFP_FS))
return;
- if (DEBUG_LOCKS_WARN_ON(irqs_disabled()))
+ if (DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)))
return;
mark_held_locks(curr, RECLAIM_FS);
}
+static void check_flags(unsigned long flags);
+
+void lockdep_trace_alloc(gfp_t gfp_mask)
+{
+ unsigned long flags;
+
+ if (unlikely(current->lockdep_recursion))
+ return;
+
+ raw_local_irq_save(flags);
+ check_flags(flags);
+ current->lockdep_recursion = 1;
+ __lockdep_trace_alloc(gfp_mask, flags);
+ current->lockdep_recursion = 0;
+ raw_local_irq_restore(flags);
+}
+
static int mark_irqflags(struct task_struct *curr, struct held_lock *hlock)
{
/*
OpenPOWER on IntegriCloud