printk: Deadlock in NMI regression
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest3 patches 16 repliesIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | printk: Split the code for storing a message into the log bufferkernel/ | +26 | 1 reply | |
| 2/3 | printk: Create helper function to queue deferred console handlingkernel/ | +9 | 2 replies | |
| 3/3 | printk/nmi: Prevent deadlock when accessing the main log buffer in NMIinclude/ kernel/ kernel/ +2 more | +52 | 5 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Sergey Senozhatsky |
|---|---|
| 1/3 | A-b |
| 2/3 | A-b |
| 3/3 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] printk: Deadlock in NMI regression
The commit 719f6a7040f1bdaf96 ("printk: Use the main logbuf in NMI when logbuf_lock is available") brought back the possible deadlocks in printk() and NMI.
This is rework of the proposed fix, see
https://lkml.kernel.org/r/[email protected]
I realized that we could rather easily move the check to vprintk_func() and still avoid any race. I believe that this is a win-win solution.
Changes against v1:
+ Move the check from vprintk_emit() to vprintk_func()
+ More straightforward commit message
+ Fix build with CONFIG_PRINTK_NMI disabled
Petr Mladek (3):
printk: Split the code for storing a message into the log buffer
printk: Create helper function to queue deferred console handling printk/nmi: Prevent deadlock when accessing the main log buffer in NMI
include/linux/printk.h | 4 ++++ kernel/printk/internal.h | 9 ++++++- kernel/printk/printk.c | 57 +++++++++++++++++++++++++++----------------- kernel/printk/printk_safe.c | 58 +++++++++++++++++++++++++++++---------------- kernel/trace/trace.c | 4 +++- lib/nmi_backtrace.c | 3 --- 6 files changed, 87 insertions(+), 48 deletions(-)
Signature · 1 line
2.13.7