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

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

diff -u --recursive --new-file v1.3.37/linux/net/core/skbuff.c linux/net/core/skbuff.c
@@ -9,6 +9,7 @@
  *		Dave Platt	:	Interrupt stacking fix.
  *	Richard Kooijman	:	Timestamp fixes.
  *		Alan Cox	:	Changed buffer format.
+ *		Alan Cox	:	destructor hook for AF_UNIX etc.
  *
  *	This program is free software; you can redistribute it and/or
  *	modify it under the terms of the GNU General Public License
@@ -460,6 +461,8 @@
 	if (skb->next)
 	 	printk("Warning: kfree_skb passed an skb still on a list (from %p).\n",
 			__builtin_return_address(0));
+	if(skb->destructor)
+		skb->destructor(skb);
 	if (skb->sk)
 	{
 	        if(skb->sk->prot!=NULL)
@@ -565,6 +568,7 @@
 	skb->tail=bptr;
 	skb->end=bptr+len;
 	skb->len=0;
+	skb->destructor=NULL;
 	return skb;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this