Re: [PATCH net] ipv6: use RCU iterator to dump route exceptions
Ido Schimmel <[email protected]>
| Newsgroups | org.kernel.vger.stable,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <20260817084849.GA283708@shredder> |
On Sat, Aug 15, 2026 at 05:46:51PM +0900, Yuyang Huang wrote:
> rt6_nh_dump_exceptions() uses hlist_for_each_entry() to iterate over
> RCU-protected exception lists. The caller holds rcu_read_lock(), but does
> not hold rt6_exception_lock, so rt6_insert_exception() can concurrently
> add an entry with hlist_add_head_rcu().
[...]
> Use hlist_for_each_entry_rcu() to safely iterate over the exception list.
>
> Fixes: 1e47b4837f3b ("ipv6: Dump route exceptions if requested")
> Cc: [email protected]
> Signed-off-by: Yuyang Huang <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
I don't think this deserves a stable tag as it only silences a KCSAN
splat, but it's trivial to backport, so OK.