cvs commit: src/sys/kern kern_descrip.c
rwatson at FreeBSD.org
Fri Jan 16 15:26:17 PST 2004
On Fri, 16 Jan 2004, Dag-Erling Smørgrav wrote:
> "Brian F. Feldman" <green at FreeBSD.org> writes:
> > I don't see a reason "newfdp" needs to be locked, since it is not
> > referenced by anything yet. If "fdp" alone is locked, that is
> > sufficient to ensure they will both be consistent.
> It needs to be locked because it is passed to functions which assert
> that it is locked.
It sounds like this is an API problem, and is probably what we should fix.
I've found WITNESS an invaluable debugging tool for locking, and when
programming on systems without it, it's a very painful experience (i.e.,
debugging lock orders on Darwin). You've also pointed out that the extra
locking work being done is actually unnecessary, so maybe we just need an
_unlocked() version of the API, or changes elsewhere?
Robert N M Watson FreeBSD Core Team, TrustedBSD Projects
robert at fledge.watson.org Senior Research Scientist, McAfee Research
More information about the cvs-all