aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/icmp_socket.c
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2011-01-19 15:01:40 -0500
committerMarek Lindner <lindner_marek@yahoo.de>2011-03-05 06:49:58 -0500
commitfb778ea173fcd58b8fc3d75c674f07fab187b55f (patch)
treeb14cfc99b7ca61ddcb49cc56c9a8e2822675debc /net/batman-adv/icmp_socket.c
parenta775eb847ae66211577d4fd2c46749b77c9993c9 (diff)
batman-adv: protect each hash row with rcu locks
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Diffstat (limited to 'net/batman-adv/icmp_socket.c')
-rw-r--r--net/batman-adv/icmp_socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c
index 319a7ccf6efa..8e0cd8a1bc02 100644
--- a/net/batman-adv/icmp_socket.c
+++ b/net/batman-adv/icmp_socket.c
@@ -220,9 +220,11 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
220 goto dst_unreach; 220 goto dst_unreach;
221 221
222 spin_lock_bh(&bat_priv->orig_hash_lock); 222 spin_lock_bh(&bat_priv->orig_hash_lock);
223 rcu_read_lock();
223 orig_node = ((struct orig_node *)hash_find(bat_priv->orig_hash, 224 orig_node = ((struct orig_node *)hash_find(bat_priv->orig_hash,
224 compare_orig, choose_orig, 225 compare_orig, choose_orig,
225 icmp_packet->dst)); 226 icmp_packet->dst));
227 rcu_read_unlock();
226 228
227 if (!orig_node) 229 if (!orig_node)
228 goto unlock; 230 goto unlock;