On Thu, May 21, 2009 at 12:23:54PM -0400, John Baldwin wrote:
> On Thursday 21 May 2009 12:15:35 pm Kostik Belousov wrote:
> > On Thu, May 21, 2009 at 12:10:59PM -0400, John Baldwin wrote:
> > Another thing done inside destroy_dev is the call to the destructors
> > of the cdevpriv data, that never had any restrictions on the sleepable
> > context.
> > 
> > We do have the KPI for the callers that cannot drop the locks and need
> > to do destroy_dev, destroy_dev_sched(9).
> 
> With the caveat that you can't make any assumptions about other threads in 
> your cdevsw routines being finished when it returns.  If you have per-device 
> data structures you need to free that are not handled by cdevpriv then you 
> probably cannot safely free them.

Yes, this is why it has callback to call after all threads are guaranteed
to be off the methods code.

Attachment: pgp9XNCdEPczF.pgp
Description: PGP signature

Reply via email to