Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2009 12:23:54 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        Scott Long <scottl@samsco.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, attilio@freebsd.org, rwatson@freebsd.org, svn-src-head@freebsd.org, "M. Warner Losh" <imp@bsdimp.com>
Subject:   Re: svn commit: r192535 - head/sys/kern
Message-ID:  <200905211223.55113.jhb@freebsd.org>
In-Reply-To: <20090521161535.GQ1927@deviant.kiev.zoral.com.ua>
References:  <3bbf2fe10905210629p46c7a204v6863aaba77354462@mail.gmail.com> <200905211211.00168.jhb@freebsd.org> <20090521161535.GQ1927@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905211223.55113.jhb>