.. | .. |
---|
31 | 31 | #include <linux/nmi.h> |
---|
32 | 32 | #include <linux/mutex.h> |
---|
33 | 33 | #include <linux/slab.h> |
---|
| 34 | +#include <linux/kdb.h> |
---|
34 | 35 | #include <linux/uaccess.h> |
---|
35 | 36 | #include <linux/pm_runtime.h> |
---|
36 | 37 | #include <linux/ktime.h> |
---|
.. | .. |
---|
3380 | 3381 | |
---|
3381 | 3382 | serial8250_rpm_get(up); |
---|
3382 | 3383 | |
---|
3383 | | - if (port->sysrq) |
---|
| 3384 | + if (port->sysrq || oops_in_progress) |
---|
3384 | 3385 | locked = 0; |
---|
3385 | | - else if (oops_in_progress) |
---|
| 3386 | + else if (in_kdb_printk()) |
---|
3386 | 3387 | locked = spin_trylock_irqsave(&port->lock, flags); |
---|
3387 | 3388 | else |
---|
3388 | 3389 | spin_lock_irqsave(&port->lock, flags); |
---|