s390/debug: Fix several s390dbf issues reported by AI scan
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first
Changes in v3 from the cover letter
- Patch 3: put back !id->areas check under lock in debug_flush() and remove existing !id->areas check before the lock (Peter Oberparleiter)
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | s390/debug: Fix NULL pointer dereference in debug_set_level()arch/ | +3 | 0 replies | |
| 2/3 | s390/debug: Do not repeat parameter override notice on debug_set_level()arch/ | +13 | 0 replies | |
| 3/3 | s390/debug: Fix race between debug area resize and event loggingarch/ | +20 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Peter Oberparleiter |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 0/3] s390/debug: Fix several s390dbf issues reported by AI scan
The s390dbf kernel parameter was added in commit a2cec6863709 ("s390/debug: Add s390dbf kernel parameter"). This series fixes three issues found in the surrounding code.
Patch 1 fixes a NULL pointer dereference in debug_set_level() introduced by that commit: the NULL check for the id argument was moved into the _debug_set_level() helper, but the newly added debug_get_param() call was left in the wrapper ahead of it.
Patch 2 eliminates a duplicate override notice that appears when drivers call debug_set_level() right after debug_register(), which is the common pattern. With the s390dbf= parameter active and many devices (e.g. many DASDs), this produced a lot of redundant log lines during boot.
Patch 3 fixes a pre-existing race between debug area resize and event logging. Setting pages to zero via the debugfs interface races with concurrent event writers: the unlocked id->areas check passes, but by the time the lock is acquired debug_areas_swap() may have published a NULL pointer, which get_active_entry() then dereferences. The race was confirmed to hang the system in testing by running concurrent debug area resize (pages 0->4 in a tight loop) against parallel DASD I/O.
Changes in v3:
- Patch 3: put back !id->areas check under lock in debug_flush() and remove existing !id->areas check before the lock (Peter Oberparleiter)
Changes in v2:
- Patch 1: Trimmed commit message; !id check removed from _debug_set_level() (Peter Oberparleiter)
- Patch 3: Trimmed commit message; !id->areas check removed from debug_flush() (Peter Oberparleiter)
Mikhail Zaslonko (3):
s390/debug: Fix NULL pointer dereference in debug_set_level() s390/debug: Do not repeat parameter override notice on
debug_set_level()
s390/debug: Fix race between debug area resize and event logging
arch/s390/kernel/debug.c | 54 ++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 18 deletions(-)
Signature · 1 line
2.55.0