ref count not decremented in destroy_dev()?

看板DFBSD_kernel作者時間21年前 (2005/01/21 09:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
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
文章代碼(AID): #11y5kK00 (DFBSD_kernel)