netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/ipv4: Update sk_for_each_entry_offset_rcu macro to  utilize rcu methods hlist_next_rcu. This fixes the warnings thrown by sparse  regarding net/ipv4/udp.c on line 1974.
@ 2017-09-27  0:54 Tim Hansen
  2017-09-27  3:03 ` David Miller
  2017-10-09  2:47 ` [lkp-robot] [net/ipv4] 6daf5023a0: BUG:unable_to_handle_kernel kernel test robot
  0 siblings, 2 replies; 4+ messages in thread
From: Tim Hansen @ 2017-09-27  0:54 UTC (permalink / raw)
  Cc: Tim Hansen, David S. Miller, open list:NETWORKING [GENERAL],
	open list

Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
---
 include/net/sock.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/sock.h b/include/net/sock.h
index aeeec62992ca..516289f6404b 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -732,10 +732,10 @@ static inline void sk_add_bind_node(struct sock *sk,
  *
  */
 #define sk_for_each_entry_offset_rcu(tpos, pos, head, offset)		       \
-	for (pos = rcu_dereference((head)->first);			       \
+	for (pos = rcu_dereference_raw(hlist_next_rcu((head)->first));	       \
 	     pos != NULL &&						       \
 		({ tpos = (typeof(*tpos) *)((void *)pos - offset); 1;});       \
-	     pos = rcu_dereference(pos->next))
+	     pos = rcu_dereference_raw(hlist_next_rcu(pos->next)))
 
 static inline struct user_namespace *sk_user_ns(struct sock *sk)
 {
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-09  2:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27  0:54 [PATCH] net/ipv4: Update sk_for_each_entry_offset_rcu macro to utilize rcu methods hlist_next_rcu. This fixes the warnings thrown by sparse regarding net/ipv4/udp.c on line 1974 Tim Hansen
2017-09-27  3:03 ` David Miller
2017-09-27 16:25   ` Tim Hansen
2017-10-09  2:47 ` [lkp-robot] [net/ipv4] 6daf5023a0: BUG:unable_to_handle_kernel kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).