Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139053
b: refs/heads/master
c: 2f85018
h: refs/heads/master
i:
  139051: cc3ad11
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Mar 30, 2009
1 parent cfed41d commit b24af81
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19cefdffbfe0f7e280f21e80875937e8700e99e2
refs/heads/master: 2f8501815256af8498904e68bd0984b1afffd6f8
21 changes: 19 additions & 2 deletions trunk/kernel/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -2260,7 +2260,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;

Expand All @@ -2279,12 +2279,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)
{
/*
Expand Down

0 comments on commit b24af81

Please sign in to comment.