cvs commit: src/share/man/man4 unix.4 src/sys/sys socket.h un.h unpcb.h src/sys/kern uipc_usrreq.c

Antoine Brodin antoine.brodin at laposte.net
Wed Apr 13 13:39:27 PDT 2005


Alfred Perlstein <alfred at freebsd.org> wrote:
> * Matthew N. Dodd <mdodd at FreeBSD.ORG> [050413 10:04] wrote:
> > On Wed, 13 Apr 2005, Antoine Brodin wrote:
> > >I'm not sure it's safe to sooptcopyout/sooptcopyin while holding the
> > >unp mutex in uipc_ctloutput.  It can fault.
> > 
> > I was concerned about this but saw that other code holds locks across 
> > sooptcopy*() calls.
> > 
> > If there is a deadlock problem it may be time to add a per unpcb lock.
> 
> This should be tripping an assertion, copyout/copyin is not ok while
> holding a mutex.  Does anyone want to add the logic to sooptcopy*?

A simple
WITNESS_WARN(WARN_GIANTOK|WARN_SLEEPOK, NULL, "Sleeping in sofoo");
should do the trick.

Cheers,

Antoine


More information about the cvs-src mailing list