aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/skbuff.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 5884f95ff0e9..6c8b6f604e76 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -799,15 +799,19 @@ struct sk_buff_fclones {
799 * @skb: buffer 799 * @skb: buffer
800 * 800 *
801 * Returns true is skb is a fast clone, and its clone is not freed. 801 * Returns true is skb is a fast clone, and its clone is not freed.
802 * Some drivers call skb_orphan() in their ndo_start_xmit(),
803 * so we also check that this didnt happen.
802 */ 804 */
803static inline bool skb_fclone_busy(const struct sk_buff *skb) 805static inline bool skb_fclone_busy(const struct sock *sk,
806 const struct sk_buff *skb)
804{ 807{
805 const struct sk_buff_fclones *fclones; 808 const struct sk_buff_fclones *fclones;
806 809
807 fclones = container_of(skb, struct sk_buff_fclones, skb1); 810 fclones = container_of(skb, struct sk_buff_fclones, skb1);
808 811
809 return skb->fclone == SKB_FCLONE_ORIG && 812 return skb->fclone == SKB_FCLONE_ORIG &&
810 fclones->skb2.fclone == SKB_FCLONE_CLONE; 813 fclones->skb2.fclone == SKB_FCLONE_CLONE &&
814 fclones->skb2.sk == sk;
811} 815}
812 816
813static inline struct sk_buff *alloc_skb_fclone(unsigned int size, 817static inline struct sk_buff *alloc_skb_fclone(unsigned int size,