2.4.36-stable kernel tree
Revisão | 226877eaab1eb1f15d43030d6662534478ab8d01 (tree) |
---|---|
Hora | 2008-11-09 23:06:09 |
Autor | Marcel Sebek <sebek64@post...> |
Commiter | Willy Tarreau |
backport vlan device unregister fix
Hi.
The attached patch was merged into 2.6.8 kernel, see
http://www.linux.sgi.com/archives/netdev/2004-08/msg00076.html
However, no similar fix is in 2.4. I've faced the problem on a
2.4.26 kernel (with external patches) and with DEBUG_SLAB turned on.
When I unregister network device with attached vlan device, the vlan
device structure is freed too early (because of wrong refcounting) and
dev_mc_discard call in unregister_netdevice uses this freed memmory,
which causes oops.
Signed-off-by: Marcel Šebek <sebek64@post.cz>
@@ -635,7 +635,6 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event, | ||
635 | 635 | ret = unregister_vlan_dev(dev, |
636 | 636 | VLAN_DEV_INFO(vlandev)->vlan_id); |
637 | 637 | |
638 | - dev_put(vlandev); | |
639 | 638 | unregister_netdevice(vlandev); |
640 | 639 | |
641 | 640 | /* Group was destroyed? */ |