diff options
| author | Daniel Thompson <[email protected]> | 2024-04-24 14:21:41 +0000 |
|---|---|---|
| committer | Daniel Thompson <[email protected]> | 2024-04-26 16:14:10 +0000 |
| commit | b2aba15ad6f908d1a620fd97f6af5620c3639742 (patch) | |
| tree | a45b833868a995f46e045bdfc9cb42f19f0befff /net/unix/af_unix.c | |
| parent | kdb: Simplify management of tmpbuffer in kdb_read() (diff) | |
| download | kernel-b2aba15ad6f908d1a620fd97f6af5620c3639742.tar.gz kernel-b2aba15ad6f908d1a620fd97f6af5620c3639742.zip | |
serial: kgdboc: Fix NMI-safety problems from keyboard reset code
Currently, when kdb is compiled with keyboard support, then we will use
schedule_work() to provoke reset of the keyboard status. Unfortunately
schedule_work() gets called from the kgdboc post-debug-exception
handler. That risks deadlock since schedule_work() is not NMI-safe and,
even on platforms where the NMI is not directly used for debugging, the
debug trap can have NMI-like behaviour depending on where breakpoints
are placed.
Fix this by using the irq work system, which is NMI-safe, to defer the
call to schedule_work() to a point when it is safe to call.
Reported-by: Liuye <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Cc: [email protected]
Reviewed-by: Douglas Anderson <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Thompson <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
