The following commit has been merged in the next branch: commit 7905069edf9d126949e2d24a31aa98ac7be7f5a9 Author: Sven Eckelmann sven.eckelmann@gmx.de Date: Sat Sep 18 15:35:35 2010 +0000
batman-adv: Remove unneeded rcu_read_lock
Regions which do not use rcu functions don't need to protected by rcu_read_lock. If we want to protect data from being freed than it must be covered by the same read-side critical section or otherwise the grace period may already ended and freed the memory before we called rcu_read_lock again.
Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
diff --git a/originator.c b/originator.c index 41e4818..471fd90 100644 --- a/originator.c +++ b/originator.c @@ -330,7 +330,6 @@ int orig_seq_print_text(struct seq_file *seq, void *offset) net_dev->name); }
- rcu_read_lock(); seq_printf(seq, "[B.A.T.M.A.N. adv %s%s, MainIF/MAC: %s/%s (%s)]\n", SOURCE_VERSION, REVISION_VERSION_STR, bat_priv->primary_if->net_dev->name, @@ -338,7 +337,6 @@ int orig_seq_print_text(struct seq_file *seq, void *offset) seq_printf(seq, " %-15s %s (%s/%i) %17s [%10s]: %20s ...\n", "Originator", "last-seen", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF", "Potential nexthops"); - rcu_read_unlock();
spin_lock_irqsave(&bat_priv->orig_hash_lock, flags);