]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - lib/dump_stack.c
lib/scatterlist: Introduce sgl_alloc() and sgl_free()
[mirror_ubuntu-bionic-kernel.git] / lib / dump_stack.c
index c5edbedd364dce20f028614c0b7679878e70913d..287ea178f0fa951a225032a4ebc84030cca5cdcb 100644 (file)
@@ -46,7 +46,12 @@ retry:
                was_locked = 1;
        } else {
                local_irq_restore(flags);
-               cpu_relax();
+               /*
+                * Wait for the lock to release before jumping to
+                * atomic_cmpxchg() in order to mitigate the thundering herd
+                * problem.
+                */
+               do { cpu_relax(); } while (atomic_read(&dump_lock) != -1);
                goto retry;
        }