usb: dwc3: rockchip: fix possible circular deadlock
[firefly-linux-kernel-4.4.55.git] / kernel / sched / rt.c
index 2b9121ea91bf63306fb0ab8ab183cb9dffc98206..8a16cba968c43c981b0e2671a5e1e2d6cc8e341a 100644 (file)
@@ -924,7 +924,16 @@ static void dump_throttled_rt_tasks(struct rt_rq *rt_rq)
                idx = find_next_bit(array->bitmap, MAX_RT_PRIO, idx + 1);
        }
 out:
+#ifdef CONFIG_PANIC_ON_RT_THROTTLING
+       /*
+        * Use pr_err() in the BUG() case since printk_sched() will
+        * not get flushed and deadlock is not a concern.
+        */
+       pr_err("%s", buf);
+       BUG();
+#else
        printk_deferred("%s", buf);
+#endif
 }
 
 static int sched_rt_runtime_exceeded(struct rt_rq *rt_rq)