net: skbuff: disambiguate argument and member for skb_list_walk_safe helper
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 13 Jan 2020 23:42:26 +0000 (18:42 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 14:48:47 +0000 (15:48 +0100)
commit 5eee7bd7e245914e4e050c413dfe864e31805207 upstream.

This worked before, because we made all callers name their next pointer
"next". But in trying to be more "drop-in" ready, the silliness here is
revealed. This commit fixes the problem by making the macro argument and
the member use different names.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/skbuff.h

index 8748abe0fab7599efd4d3f4dcfb248e467457a66..de3e59329b022e4f9858a8f125ece2a62b60aa96 100644 (file)
@@ -1341,9 +1341,9 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
 }
 
 /* Iterate through singly-linked GSO fragments of an skb. */
-#define skb_list_walk_safe(first, skb, next)                                   \
-       for ((skb) = (first), (next) = (skb) ? (skb)->next : NULL; (skb);      \
-            (skb) = (next), (next) = (skb) ? (skb)->next : NULL)
+#define skb_list_walk_safe(first, skb, next_skb)                               \
+       for ((skb) = (first), (next_skb) = (skb) ? (skb)->next : NULL; (skb);  \
+            (skb) = (next_skb), (next_skb) = (skb) ? (skb)->next : NULL)
 
 static inline void skb_list_del_init(struct sk_buff *skb)
 {