Re: [PATCH net v2] net: x25: shut down T20 timer before freeing neighbour

From: Martin Schiller

Date: Wed Nov 25 2026 - 05:06:53 EST


On Wed, 25 Nov 2026 10:39:47 +0100, netdev-bot wrote:
> Would it be more robust to purge nb->queue in x25_neigh_put() before
> kfree()? At that point nobody else can add to the queue, and
> skb_queue_purge() is safe in atomic context.

I agree. A socket that takes the neighbour in the window before
x25_route_device_down() can still queue frames after the list
reference is gone, so the purge belongs where the neighbour is freed.
The timer shutdown is fine where it is, as nothing can rearm a timer
after timer_shutdown_sync().

Felix, could you send a v3 that moves the purge into x25_neigh_put()
and documents the timer shutdown in the comment above
__x25_remove_neigh()? As the netdev bot asked, please also say in the
commit message how you found the issue and how you reproduced it.
Please drop my Acked-by for it, I'll look at the v3 again.

pw-bot: changes-requested