Re: [PATCH net v2] ip6mr: Fix lockdep and sparse RCU warnings

From: Eric Dumazet
Date: Tue Oct 01 2024 - 09:27:20 EST


On Tue, Oct 1, 2024 at 2:50 PM Stefan Wiehler <stefan.wiehler@xxxxxxxxx> wrote:
>
> > OK, but RT6_TABLE_DFLT always exists, ip6mr_get_table(net, RT6_TABLE_DFLT)
> > can never fail.
> >
> > This is ensured at netns creation, from ip6mr_rules_init()
>
> OK, but nevertheless we need to enter a RCU read-side critical section before
> ip6mr_get_table() is called.

This could be a lockdep annotation error then, at least for
RT6_TABLE_DFLT, oh well.

Note that net/ipv4/ipmr.c would have a similar issue.

Please split your patch in small units, their Fixes: tags are likely
different, and if some code breaks something,
fixing the issue will be easier.

The changelog seemed to only address the first ip6mr_vif_seq_start() part.