Re: [PATCH net v2 0/2] net/x25: don't call lock_sock() from softirq in x25_kill_by_neigh()
From: Martin Schiller
Date: Fri Nov 27 2026 - 01:43:59 EST
On Fri, 27 Nov 2026 07:33:54 +0100, netdev-bot wrote:
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by LLM and not proven at runtime). If it was triggered
> please include the symptoms, like the stack trace or kernel messages.
Patch 1 fixes a triggered issue. syzbot hits it with its reproducers,
see the two reports in the Closes: tags. It also reproduces in QEMU
with two lapbether devices on a veth pair: when the link goes down
with a call up, an unpatched kernel with lockdep and
DEBUG_ATOMIC_SLEEP reports (trimmed):
WARNING: inconsistent lock state
inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
x25test/26 [HC0[0]:SC1[1]:HE1:SE0] takes:
ffff888000a81218 (sk_lock-AF_X25){+.?.}-{0:0}, at: x25_kill_by_neigh+0x50/0x99
...
BUG: sleeping function called from invalid context at net/core/sock.c:3908
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 26, name: x25test
Call Trace:
<IRQ>
? lock_sock_nested+0x3e/0x6c
? x25_kill_by_neigh+0x50/0x99
? x25_lapb_receive_frame+0x2d9/0x2f7
...
? lapbeth_napi_poll+0x30/0x47
? __napi_poll.constprop.0+0x1f/0x107
? net_rx_action+0x134/0x26c
? handle_softirqs+0x14c/0x2e5
With the series applied, these splats are gone; the tests are
described in the cover letter.
Patch 2 is theoretical. The x25_sendmsg() and x25_output() cases were
found by the netdev AI review of v1, the x25_recvmsg() case by Krystian
by code inspection. The window, a CLEAR or a link failure handled in
softirq while the socket lock is dropped, is narrow, and I have not
reproduced it at runtime.