Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Oct 2001 18:39:23 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   RE: cvs commit: src/sys/kern kern_mutex.c kern_sx.c
Message-ID:  <XFMail.011019183923.jhb@FreeBSD.org>
In-Reply-To: <200110200122.f9K1Mgk29798@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On 20-Oct-01 John Baldwin wrote:
> jhb         2001/10/19 18:22:42 PDT
> 
>   Modified files:
>     sys/kern             kern_mutex.c kern_sx.c 
>   Log:
>   The mtx_init() and sx_init() functions bzero'd locks before handing them
>   off to witness_init() making the check for double intializating a lock by
>   testing the LO_INITIALIZED flag moot.  Workaround this by checking the
>   LO_INITIALIZED flag ourself before we bzero the lock structure.

This has only been tested on x86 and alpha.  If you get a panic with this
during early boot, it may be b/c 0xdeadc0de has LO_INITIALIZED set in it. :) 
In that case, you will want to malloc() your mutexes with M_ZERO similar to
some changes I checked in last week.  If it's after boot, it may be a
legitimate bug, in which case traces and KTR logs may be your best help in
figuring out what is going on.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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