On Friday, 28 June 2019 18:49:05 CEST David Miller wrote:
[...]
I think that when you have the read_lock held, RCU is not necessary in order
to use __in6_dev_get() but I may be mistaken. Just FYI...
Problem is that the read_lock() can only be used after the __in6_dev_get()
finished sucessfully. Because the read_lock's lock is stored in the inet6_dev
object which was retrieved via __in6_dev_get. And the __in6_dev_get kerneldoc
states [1] that you either have to hold RTNL or RCU (see also the
rcu_dereference_rtnl call inside this function).
So we can only drop the rcu_read_lock when RTNL lock is held . I would guess
now that this is not the case here - Linus' might want to correct me.
Kind regards,
Sven
[1] https://lxr.missinglinkelectronics.com/linux/include/net/addrconf.h#L335