summaryrefslogtreecommitdiff
path: root/include/linux/skbuff.h
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 /include/linux/skbuff.h
parenta8305bff685252e80b7c60f4f5e7dd2e63e38218 (diff)
downloadlwn-992cba7e276d438ac8b0a8c17b147b37c8c286f7.tar.gz
lwn-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 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index c4c9e3f5cd9a..e3a53ca4a9b5 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1344,6 +1344,12 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
skb->next = NULL;
}
+static inline void skb_list_del_init(struct sk_buff *skb)
+{
+ __list_del_entry(&skb->list);
+ skb_mark_not_on_list(skb);
+}
+
/**
* skb_queue_empty - check if a queue is empty
* @list: queue head