Re: [PATCH net v3] net: x25: shut down T20 timer before freeing neighbour
From: Martin Schiller
Date: Fri Nov 27 2026 - 01:33:53 EST
On Wed, 25 Nov 2026 11:31:53 +0100, Felix Hoffmann wrote:
> Purge queued frames when the last neighbour reference is dropped.
Thanks, that addresses the review.
The AI review of v3 [1] adds that the use-after-free does not even
need a race: x25_exit() frees the neighbours before the netdev notifier
is unregistered, so unloading the module while a link is in state 2
always frees a neighbour with an armed T20 timer, and
NETDEV_PRE_TYPE_CHANGE also skips x25_link_terminated(). The patch
covers both, and as it is already Cc'd to stable, I don't think the
commit message needs a respin for this.
The dangling nb->dev the review also mentions is a separate,
pre-existing issue, which I'll look into separately.
Acked-by: Martin Schiller <ms@xxxxxxxxxx>
[1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125103153.53012-1-f3lix.dev%40gmx.de