DragonFly BSD
DragonFly kernel List (threaded) for 2005-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

ref count not decremented in destroy_dev()?


From: Chuck Tuffli <chuck_tuffli@xxxxxxxxxxx>
Date: Thu, 20 Jan 2005 17:03:19 -0800

In my loadable module, the _attach function calls cdevsw_add() and then make_dev(). The _detach function calls destroy_dev() and then cdevsw_remove() but generates the following dmesg

svd(202)[ffffffff/00000000]: Warning: cdevsw_remove() called while 1 device ref!

I think the cdevsw_*() calls correctly increment and decrement the d_refs variable in struct cdevsw. The part that confuses me is while make_dev increments d_refs via a call to hashdev(), there doesn't seem to be a corresponding decrement of d_refs in destroy_dev. Does anyone know off hand where this should be happening or is my driver unregistering incorrectly? Tnx.

--
Chuck Tuffli
Agilent Technologies



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]