Re: [RFC] ifa_list needs proper rcu protection

2019-05-04 Thread Eric Dumazet
On 5/4/19 2:01 PM, Florian Westphal wrote: > Eric Dumazet 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. >>

Re: [RFC] ifa_list needs proper rcu protection

2019-05-04 Thread Florian Westphal
Eric Dumazet 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 suppor

[RFC] ifa_list needs proper rcu protection

2019-04-25 Thread Eric Dumazet
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()