diff options
| author | Kalle Valo <kvalo@codeaurora.org> | 2016-03-06 14:57:44 +0200 |
|---|---|---|
| committer | Kalle Valo <kvalo@codeaurora.org> | 2016-03-06 14:57:44 +0200 |
| commit | 89ef41bfaa46f24a14b776f1cd78c0e0b39e54ce (patch) | |
| tree | 8371cf24800fffa1d768767a8bf3e498a9edaa34 /lib/dump_stack.c | |
| parent | 89916cc90a78fffbc4c3d7cb1f6540fb2e551804 (diff) | |
| parent | 00a1f0a93dea3cf1c141df79bfd06e7c9ee54162 (diff) | |
Merge 'net-next/master'
Needed by the upcoming merge of iwlwifi-next-for-kalle-2016-03-02 tag.
Diffstat (limited to 'lib/dump_stack.c')
| -rw-r--r-- | lib/dump_stack.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/dump_stack.c b/lib/dump_stack.c index 6745c6230db3..c30d07e99dba 100644 --- a/lib/dump_stack.c +++ b/lib/dump_stack.c @@ -25,6 +25,7 @@ static atomic_t dump_lock = ATOMIC_INIT(-1); asmlinkage __visible void dump_stack(void) { + unsigned long flags; int was_locked; int old; int cpu; @@ -33,9 +34,8 @@ asmlinkage __visible void dump_stack(void) * Permit this cpu to perform nested stack dumps while serialising * against other CPUs */ - preempt_disable(); - retry: + local_irq_save(flags); cpu = smp_processor_id(); old = atomic_cmpxchg(&dump_lock, -1, cpu); if (old == -1) { @@ -43,6 +43,7 @@ retry: } else if (old == cpu) { was_locked = 1; } else { + local_irq_restore(flags); cpu_relax(); goto retry; } @@ -52,7 +53,7 @@ retry: if (!was_locked) atomic_set(&dump_lock, -1); - preempt_enable(); + local_irq_restore(flags); } #else asmlinkage __visible void dump_stack(void) |
