patch-2.1.10 linux/net/core/skbuff.c

Next file: linux/net/core/sock.c
Previous file: linux/net/core/iovec.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.9/linux/net/core/skbuff.c linux/net/core/skbuff.c
@@ -634,7 +634,7 @@
 struct sk_buff *alloc_skb(unsigned int size,int priority)
 {
 	struct sk_buff *skb;
-	int len=size;
+	int len;
 	unsigned char *bptr;
 
 	if (intr_count && priority!=GFP_ATOMIC) 
@@ -648,6 +648,8 @@
 	}
 
 	size=(size+15)&~15;		/* Allow for alignments. Make a multiple of 16 bytes */
+	len = size;
+	
 	size+=sizeof(struct sk_buff);	/* And stick the control itself on the end */
 	
 	/*
@@ -748,7 +750,7 @@
 	int inbuff = 0;
 	
 	IS_SKB(skb);
-	if (skb_tailroom(skb) >= sizeof(struct sk_buff))
+	if (!skb->inclone && skb_tailroom(skb) >= sizeof(struct sk_buff))
 	{
 		n = ((struct sk_buff *) skb->end) - 1;
 		skb->end -= sizeof(struct sk_buff);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov