summaryrefslogtreecommitdiff
path: root/include/net/ping.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2022-11-29 15:06:44 +0100
committerPaolo Abeni <pabeni@redhat.com>2022-12-01 12:42:46 +0100
commitc25b7a7a565e5eeb2459b37583eea67942057511 (patch)
tree595a7dbdbdd35175a524565921f95ea569cab9b2 /include/net/ping.h
parent9aff0ec5cba5b4ec4f199bbc6d0b7e1fedfa149e (diff)
inet: ping: use hlist_nulls rcu iterator during lookup
ping_lookup() does not acquire the table spinlock, so iteration should use hlist_nulls_for_each_entry_rcu(). Spotted during code review. Fixes: dbca1596bbb0 ("ping: convert to RCU lookups, get rid of rwlock") Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Florian Westphal <fw@strlen.de> Link: https://lore.kernel.org/r/20221129140644.28525-1-fw@strlen.de Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net/ping.h')
-rw-r--r--include/net/ping.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/net/ping.h b/include/net/ping.h
index e4ff3911cbf5..9233ad3de0ad 100644
--- a/include/net/ping.h
+++ b/include/net/ping.h
@@ -16,9 +16,6 @@
#define PING_HTABLE_SIZE 64
#define PING_HTABLE_MASK (PING_HTABLE_SIZE-1)
-#define ping_portaddr_for_each_entry(__sk, node, list) \
- hlist_nulls_for_each_entry(__sk, node, list, sk_nulls_node)
-
/*
* gid_t is either uint or ushort. We want to pass it to
* proc_dointvec_minmax(), so it must not be larger than MAX_INT