patch-2.4.18 linux/net/irda/irlan/irlan_eth.c
Next file: linux/net/irda/irlap.c
Previous file: linux/net/irda/irlan/irlan_common.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Thu Jan 10 18:12:41 2002
- Orig file:
linux.orig/net/irda/irlan/irlan_eth.c
- Orig date:
Mon Feb 18 20:18:40 2002
diff -Naur -X /home/marcelo/lib/dontdiff linux.orig/net/irda/irlan/irlan_eth.c linux/net/irda/irlan/irlan_eth.c
@@ -61,7 +61,16 @@
dev->hard_start_xmit = irlan_eth_xmit;
dev->get_stats = irlan_eth_get_stats;
dev->set_multicast_list = irlan_eth_set_multicast_list;
- dev->features |= NETIF_F_DYNALLOC;
+
+ /* NETIF_F_DYNALLOC feature was set by irlan_eth_init() and would
+ * cause the unregister_netdev() to do asynch completion _and_
+ * kfree self->dev afterwards. Which is really bad because the
+ * netdevice was not allocated separately but is embedded in
+ * our control block and therefore gets freed with *self.
+ * The only reason why this would have been enabled is to hide
+ * some netdev refcount issues. If unregister_netdev() blocks
+ * forever, tell us about it... */
+ //dev->features |= NETIF_F_DYNALLOC;
ether_setup(dev);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)