io_uring: don't assume mm is constant across submits
[linux-2.6-microblaze.git] / kernel / rcu / tree_stall.h
index ca21d28..70d48c5 100644 (file)
@@ -13,6 +13,7 @@
 
 /* panic() on RCU Stall sysctl. */
 int sysctl_panic_on_rcu_stall __read_mostly;
+int sysctl_max_rcu_stall_to_panic __read_mostly;
 
 #ifdef CONFIG_PROVE_RCU
 #define RCU_STALL_DELAY_DELTA          (5 * HZ)
@@ -106,6 +107,11 @@ early_initcall(check_cpu_stall_init);
 /* If so specified via sysctl, panic, yielding cleaner stall-warning output. */
 static void panic_on_rcu_stall(void)
 {
+       static int cpu_stall;
+
+       if (++cpu_stall < sysctl_max_rcu_stall_to_panic)
+               return;
+
        if (sysctl_panic_on_rcu_stall)
                panic("RCU Stall\n");
 }