On Thu, Sep 29, 2016 at 05:31:27PM +0200, Sven Eckelmann wrote:
First you have to use hlist_add_head_rcu and hlist_add_behind_rcu here because the readers use RCU to access the list. I think it would also be more appropriate to replace the rcu_read_lock in the batadv_hardif_neigh_get_pre function and instead use lockdep to mark the function as "requires hard_iface->neigh_list_lock".
Hm, I'm currently wondering... isn't this a bug we already have now, then? Shouldn't this have been an hlist_add_head_rcu() in the first place?