diff options
| author | Théo Lebrun <theo.lebrun@bootlin.com> | 2026-09-30 20:35:36 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-05 16:08:44 -0700 |
| commit | 3c9d88b04e6cfd1dac03e89166fef34077c79763 (patch) | |
| tree | 932667e381bd882aab8229afbbab672c17ba0745 /include/linux/debugobjects.h | |
| parent | 4022ea9c421179edfab4bc2d6fe1ef19f688d651 (diff) | |
net: macb: move printk() calls out of bp->lock critical section
printk() call while bp->lock is acquired might be a bad idea:
- It grows the spinlock atomic section.
- If netconsole is active on the same interface (and we run on the
queue's CPU), we risk a deadlock because macb_poll_controller()
calls macb_interrupt() which grab bp->lock if an IRQ is pending.
Three messages are changed:
- In macb_tx_error_task(), defer netdev_err("halt tx timed out") call
to after the critical section. Update the message to highlight it
occurred in the past. Inherit the buffer exhaustion boolean variable
name from the old code comment.
- In macb_tx_error_task(), defer the netdev_err("TX buffers exhausted
mid-frame") call out of the loop. This also means it goes from
1-per-error to 1-per-task-invocation.
- In IRQ handling, move HRESP error printing out of
macb_interrupt_misc() into macb_interrupt(). Again, it means we
dedup error reporting if status is read multiple times in a row with
HRESP bit set. This is fine as from past instances I've seen, this
message spams our log if it occurs.
Notice we *ignore* debug printks; if you are debugging MACB maybe don't
use netconsole...
The netconsole deadlock is theoretical & never reproduced.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Link: https://patch.msgid.link/20260930-macb-irq-v1-1-8994a4c8f3bb@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
