projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98e948f
)
Revert "bpf, sockmap: Prevent lock inversion deadlock in map delete elem"
author
Jakub Sitnicki
<jakub@cloudflare.com>
Mon, 27 May 2024 11:20:08 +0000
(13:20 +0200)
committer
Daniel Borkmann
<daniel@iogearbox.net>
Mon, 27 May 2024 17:34:25 +0000
(19:34 +0200)
This reverts commit
ff91059932401894e6c86341915615c5eb0eca48
.
This check is no longer needed. BPF programs attached to tracepoints are
now rejected by the verifier when they attempt to delete from a
sockmap/sockhash maps.
Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link:
https://lore.kernel.org/bpf/20240527-sockmap-verify-deletes-v1-2-944b372f2101@cloudflare.com
net/core/sock_map.c
patch
|
blob
|
history
diff --git
a/net/core/sock_map.c
b/net/core/sock_map.c
index
9402889
..
63c016b
100644
(file)
--- a/
net/core/sock_map.c
+++ b/
net/core/sock_map.c
@@
-423,9
+423,6
@@
static int __sock_map_delete(struct bpf_stab *stab, struct sock *sk_test,
struct sock *sk;
int err = 0;
- if (irqs_disabled())
- return -EOPNOTSUPP; /* locks here are hardirq-unsafe */
-
spin_lock_bh(&stab->lock);
sk = *psk;
if (!sk_test || sk_test == sk)
@@
-948,9
+945,6
@@
static long sock_hash_delete_elem(struct bpf_map *map, void *key)
struct bpf_shtab_elem *elem;
int ret = -ENOENT;
- if (irqs_disabled())
- return -EOPNOTSUPP; /* locks here are hardirq-unsafe */
-
hash = sock_hash_bucket_hash(key, key_size);
bucket = sock_hash_select_bucket(htab, hash);