Files
linuxkit/kernel/patches-5.4.x-rt/0209-panic-disable-random-on-rt.patch
Tiejun Chen 6f40ada81c enable rt for 5.4.x
Signed-off-by: Tiejun Chen <tiejunc@vmware.com>
2020-04-08 20:18:14 -07:00

27 lines
622 B
Diff

From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 14 Jul 2015 14:26:34 +0200
Subject: panic: skip get_random_bytes for RT_FULL in init_oops_id
Disable on -RT. If this is invoked from irq-context we will have problems
to acquire the sleeping lock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/panic.c | 2 ++
1 file changed, 2 insertions(+)
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -521,9 +521,11 @@ static u64 oops_id;
static int init_oops_id(void)
{
+#ifndef CONFIG_PREEMPT_RT
if (!oops_id)
get_random_bytes(&oops_id, sizeof(oops_id));
else
+#endif
oops_id++;
return 0;