Thread (20 messages) 20 messages, 3 authors, 2021-06-17

Re: [PATCH bpf-next v2 03/16] xdp: add proper __rcu annotations to redirect map entries

From: Toke Høiland-Jørgensen <hidden>
Date: 2021-06-17 21:14:02
Also in: bpf

Martin KaFai Lau [off-list ref] writes:
On Tue, Jun 15, 2021 at 04:54:42PM +0200, Toke Høiland-Jørgensen wrote:
[ ... ]
quoted
 static void *__dev_map_hash_lookup_elem(struct bpf_map *map, u32 key)
 {
 	struct bpf_dtab *dtab = container_of(map, struct bpf_dtab, map);
@@ -266,7 +270,8 @@ static void *__dev_map_hash_lookup_elem(struct bpf_map *map, u32 key)
 	struct bpf_dtab_netdev *dev;
 
 	hlist_for_each_entry_rcu(dev, head, index_hlist,
-				 lockdep_is_held(&dtab->index_lock))
+				 (lockdep_is_held(&dtab->index_lock) ||
+				  rcu_read_lock_bh_held()))
This change is not needed also.
Ah yes, of course - my bad for forgetting to remove that as well. Will
send a v3!

-Toke
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help