On Sat, Aug 06, 2016 at 10:13:38AM +0200, Sven Eckelmann wrote:
And to be fair: There is one case were a spinlock is missing in batadv_find_router
last_candidate = orig_node->last_bonding_candidate; if (last_candidate) last_cand_router = rcu_dereference(last_candidate->router);
I had this on my list but mostly forgot about it while chasing the reference counting bugs. Maybe you found more problems but I am not sure which ones :)
Right, that was the part that startled me in the first place :-). (bc. of the rcu_read_lock() one line earlier, I falsely assumed that the author wanted to have it rcu-locked for the reader-side - but you are right, spinlocking for both reader and writer side is another option :) )