diff options
author | John Fastabend <john.fastabend@gmail.com> | 2018-07-05 18:06:01 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-07-08 01:16:58 +0300 |
commit | 1d1ef005dbc6de673c62cbd2562290ada3090463 (patch) | |
tree | 91b442e56a0eae99b6be5071dc95eaf2e2cddc12 /kernel/bpf | |
parent | 547b3aa451ae2739585547db9fbdee11a43ff999 (diff) | |
download | linux-1d1ef005dbc6de673c62cbd2562290ada3090463.tar.xz |
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/bpf')
-rw-r--r-- | kernel/bpf/sockmap.c | 2 |
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; } |