Re: [PATCH net] net: x25: shut down T20 timer before freeing neighbour
From: Martin Schiller
Date: Tue Nov 24 2026 - 02:55:53 EST
On Fri, 31 Jul 2026, Felix Hoffmann wrote:
> Shut the timer down synchronously in __x25_remove_neigh() before
> dropping the list-owned reference.
The fix is right. The AI review of an unrelated patch has just found
the same use-after-free again [1].
The placement question from Simon's review doesn't matter for the
current callers, which only pass neighbours that are on the list, but
moving the two calls inside the if (nb->node.next) block would match
the comment. As the patch is marked "Changes Requested", it needs a v2
with that change, as a new thread with [PATCH net v2]. Unless you'd
like to send it yourself, I'll post it in a few days, with you as the
author. If you do send it, feel free to add my
Acked-by: Martin Schiller <ms@xxxxxxxxxx>
The dangling nb->dev the review mentions is a separate issue, which
I'll look into separately.
[1] https://lore.kernel.org/all/179549218277.3135.9518512691383315581@xxxxxxxxxx/