Re: [PATCH net] ipv6: use RCU iterator to dump route exceptions

From: Ido Schimmel

Date: Mon Aug 17 2026 - 04:51:01 EST


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: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Yuyang Huang <sigefriedhyy@xxxxxxxxx>

Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>

I don't think this deserves a stable tag as it only silences a KCSAN
splat, but it's trivial to backport, so OK.