summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2018-07-05 08:06:01 -0700
committerAlexei Starovoitov <ast@kernel.org>2018-07-07 15:16:58 -0700
commit1d1ef005dbc6de673c62cbd2562290ada3090463 (patch)
tree91b442e56a0eae99b6be5071dc95eaf2e2cddc12 /kernel
parent547b3aa451ae2739585547db9fbdee11a43ff999 (diff)
downloadlinux-1d1ef005dbc6de673c62cbd2562290ada3090463.tar.bz2
bpf: sockmap, hash table is RCU so readers do not need locks
This removes locking from readers of RCU hash table. Its not necessary. Fixes: 81110384441a ("bpf: sockmap, add hash map support") Signed-off-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/bpf/sockmap.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/bpf/sockmap.c b/kernel/bpf/sockmap.c
index 3847a7ce7dae..00fb2e328d1b 100644
--- a/kernel/bpf/sockmap.c
+++ b/kernel/bpf/sockmap.c
@@ -2467,10 +2467,8 @@ struct sock *__sock_hash_lookup_elem(struct bpf_map *map, void *key)
b = __select_bucket(htab, hash);
head = &b->head;
- raw_spin_lock_bh(&b->lock);
l = lookup_elem_raw(head, hash, key, key_size);
sk = l ? l->sk : NULL;
- raw_spin_unlock_bh(&b->lock);
return sk;
}