On 5/4/19 2:01 PM, Florian Westphal wrote:
> Eric Dumazet <[email protected]> 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.

Yes, I came to the same conclusion.

Reply via email to