summaryrefslogtreecommitdiffstats
path: root/lib/dump_stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dump_stack.c')
-rw-r--r--lib/dump_stack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/dump_stack.c b/lib/dump_stack.c
index 5cff72f18c4a..33ffbf308853 100644
--- a/lib/dump_stack.c
+++ b/lib/dump_stack.c
@@ -106,7 +106,12 @@ retry:
106 was_locked = 1; 106 was_locked = 1;
107 } else { 107 } else {
108 local_irq_restore(flags); 108 local_irq_restore(flags);
109 cpu_relax(); 109 /*
110 * Wait for the lock to release before jumping to
111 * atomic_cmpxchg() in order to mitigate the thundering herd
112 * problem.
113 */
114 do { cpu_relax(); } while (atomic_read(&dump_lock) != -1);
110 goto retry; 115 goto retry;
111 } 116 }
112 117