svn commit: r208876 - head/sys/netinet

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Jun 7 20:07:59 UTC 2010


On Sun, Jun 06, 2010 at 04:11:17PM +0000, Randall Stewart wrote:
> Author: rrs
> Date: Sun Jun  6 16:11:16 2010
> New Revision: 208876
> URL: http://svn.freebsd.org/changeset/base/208876
> 
> Log:
>   1) Further enhance the INVARIANT lock validation (no locks) are
>      held by checking the create and inp locks as well.
[...]
> +	if (mtx_owned(&inp->inp_create_mtx)) {
> +		panic("Own create lock on inp");
> +	}
> +	if (mtx_owned(&inp->inp_mtx)) {
> +		panic("Own inp lock on inp");
> +	}

If you replace this with:

	mtx_assert(&inp->inp_create_mtx, MA_NOTOWNED);
	mtx_assert(&inp->inp_mtx, MA_NOTOWNED);

But the kernel has to be compiled with INVARIANTS to make it work.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20100607/9f868c9c/attachment.pgp


More information about the svn-src-all mailing list