[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-vlan
Subject:    [VLAN] [patch] Fix the oops on removal of VLAN
From:       eran () nbase ! co ! il (Eran Man)
Date:       2001-12-03 8:52:20
[Download RAW message or body]

As a follow-up to my previous post 
(http://marc.theaimsgroup.com/?l=linux-kernel&m=100503807601581&w=2), 
the attached patch eliminates the oops on VLAN removal. It is against 
2.4.16+Ben's VLAN 1.6 patch, but should apply to all kernels 2.4.14 
through 2.4.17-pre2.
-- 
Eran Mann                 Direct  : 972-4-9936230
Senior Software Engineer  Fax     : 972-4-9890430
Optical Access            Email   : emann@opticalaccess.com




["8021q.patch" (text/plain)]

diff -x .depend -wuNr 2.4.16/net/8021q/vlan.c 2.4.16v/net/8021q/vlan.c
--- 2.4.16/net/8021q/vlan.c	Thu Nov 29 11:35:51 2001
+++ 2.4.16v/net/8021q/vlan.c	Sun Dec  2 10:20:09 2001
@@ -345,6 +345,8 @@
 	/* set up method calls */
 	new_dev->init = vlan_dev_init;
 	new_dev->destructor = vlan_dev_destruct;
+	
+	new_dev->features |= NETIF_F_DYNALLOC ; 
 	    
 	/* new_dev->ifindex = 0;  it will be set when added to
 	 * the global list.
diff -x .depend -wuNr 2.4.16/net/8021q/vlan_dev.c 2.4.16v/net/8021q/vlan_dev.c
--- 2.4.16/net/8021q/vlan_dev.c	Thu Nov 29 11:35:51 2001
+++ 2.4.16v/net/8021q/vlan_dev.c	Sun Dec  2 10:29:59 2001
@@ -511,10 +511,6 @@
 			VLAN_FMEM_DBG("dev->priv free, addr: %p\n", dev->priv);
 			dev->priv = NULL;
 		}
-
-		kfree(dev);
-		VLAN_FMEM_DBG("net_device free, addr: %p\n", dev);
-		dev = NULL;
 	}
 }
 

_______________________________________________
VLAN mailing list  -  VLAN@Scry.WANfear.com
http://www.WANfear.com/mailman/listinfo/vlan
VLAN Page:  http://scry.wanfear.com/~greear/vlan.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic