hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/tty/serial/8250/8250_port.c
....@@ -31,6 +31,7 @@
3131 #include <linux/nmi.h>
3232 #include <linux/mutex.h>
3333 #include <linux/slab.h>
34
+#include <linux/kdb.h>
3435 #include <linux/uaccess.h>
3536 #include <linux/pm_runtime.h>
3637 #include <linux/ktime.h>
....@@ -3380,9 +3381,9 @@
33803381
33813382 serial8250_rpm_get(up);
33823383
3383
- if (port->sysrq)
3384
+ if (port->sysrq || oops_in_progress)
33843385 locked = 0;
3385
- else if (oops_in_progress)
3386
+ else if (in_kdb_printk())
33863387 locked = spin_trylock_irqsave(&port->lock, flags);
33873388 else
33883389 spin_lock_irqsave(&port->lock, flags);