dev_get_by_name without dev_put

From: fabrizio.gennari@philips.com
Date: Wed Jul 04 2001 - 08:49:46 EST


Every time dev_get_by_name is called, and it has returned a valid struct net_device*, dev_put should be called afterwards, because otherwise the machine hangs when the device is unregistered (since dev->refcnt > 1). However, it seems that some drivers do
not call dev_put after dev_get_by_name: for example, drivers/net/pppoe.c at line 573 and net/core/dv.c at line 168. Am I wrong?
---------------------------------------------------------
Fabrizio Gennari tel. +39 039 203 7816
Philips Research Monza fax. +39 039 203 7800
via G. Casati 23 fabrizio.gennari@philips.com
20052 Monza (MI) Italy http://www.research.philips.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 07 2001 - 21:00:14 EST