[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

callback being called even after fini is successful



Hi,
	I am writing a network device driver on solaris7.0. when I do
rem_drv _fini is called which calls detach routine.
In detach routine I am releasing all the memory acquired by me. then I
return success. then _fini returns with success after removing all the
structures. now after this the callback function which we gave is being
called. I mean I have releasebuf a call back function which is called when
the upper layers wantt o release the buffers I gave when I received some
packets. the problem is I acquire a mutex in the callback function and
release it immediately once i do some work. 

	So in the above case that is, in the detach I would have destroyed
all mutexes and return success to _fini. Then fini releases anthing which is
acquired in _ini and returns successfully. But after this my callback fn ie
releasebuf is being called. when it enters this routine it tries to enter
the mutex which has been already destroyed. so the system panics and says
panic: mutex_enter bad mutex

	Can you please help me out to resolve this issue

	TIA

	Regards
	Sreeram