[PATCH] net/core/skbuff.c fix skb_expand_head off logic error!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



fix logic error!

--- linux/net/core/skbuff.c.orig	2018-04-23 20:55:37.747731000 +0800
+++ linux/net/core/skbuff.c	2018-04-23 20:56:30.782520000 +0800
@@ -1492,7 +1492,7 @@ int pskb_expand_head(struct sk_buff *skb
 	} else {
 		skb_free_head(skb);
 	}
-	off = (data + nhead) - skb->head;
+	off = (skb->data - skb->head) + nhead;
 
 	skb->head     = data;
 	skb->head_frag = 0;



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]