Eric Dumazet <eric.duma...@gmail.com> wrote: Sorry for late reply.
> It looks that unless RTNL is held, accessing ifa_list needs proper RCU > protection ? > > indev->ifa_list can be changed under us by another cpu (which owns RTNL) > > Lets took an example. > > (A proper rcu_dereference() with an happy sparse support would require adding > __rcu attribute, > I put a READ_ONCE() which should be just fine in this particular context) I don't see e.g. __inet_insert_ifa() use rcu_assign_pointer() or similar primitive, so I don't think its enough to change readers. Same for __inet_del_ifa(), i see freeing gets dealyed via call_rcu, but it uses normal assignemts instead of a rcu helper. So, I am afraid we will have to sprinkle some rcu_assign_/derefence in several places.