aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-07-31 15:27:56 -0700
committerDavid S. Miller <davem@davemloft.net>2018-09-10 10:06:54 -0700
commit992cba7e276d438ac8b0a8c17b147b37c8c286f7 (patch)
tree50aaa7b0231a83b7b58ad60c4da88d9905b89b0e /net/core/dev.c
parentnet: Add and use skb_mark_not_on_list(). (diff)
downloadlinux-dev-992cba7e276d438ac8b0a8c17b147b37c8c286f7.tar.xz
linux-dev-992cba7e276d438ac8b0a8c17b147b37c8c286f7.zip
net: Add and use skb_list_del_init().
It documents what is happening, and eliminates the spurious list pointer poisoning. In the long term, in order to get proper list head debugging, we might want to use the list poison value as the indicator that an SKB is a singleton and not on a list. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f76dd7e14dd6..0b2d777e5b9e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5295,8 +5295,7 @@ static void __napi_gro_flush_chain(struct napi_struct *napi, u32 index,
list_for_each_entry_safe_reverse(skb, p, head, list) {
if (flush_old && NAPI_GRO_CB(skb)->age == jiffies)
return;
- list_del(&skb->list);
- skb_mark_not_on_list(skb);
+ skb_list_del_init(skb);
napi_gro_complete(skb);
napi->gro_hash[index].count--;
}
@@ -5481,8 +5480,7 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
ret = NAPI_GRO_CB(skb)->free ? GRO_MERGED_FREE : GRO_MERGED;
if (pp) {
- list_del(&pp->list);
- skb_mark_not_on_list(pp);
+ skb_list_del_init(pp);
napi_gro_complete(pp);
napi->gro_hash[hash].count--;
}