kern/79493: [PATCH] Reproducible if_tun panic

Wojciech A. Koszek dunstan at freebsd.czest.pl
Mon Apr 4 09:40:07 PDT 2005


The following reply was made to PR kern/79493; it has been noted by GNATS.

From: "Wojciech A. Koszek" <dunstan at freebsd.czest.pl>
To: freebsd-gnats-submit at FreeBSD.org, chris at unixpages.org
Cc:  
Subject: Re: kern/79493: [PATCH] Reproducible if_tun panic
Date: Mon, 4 Apr 2005 16:39:31 +0000

 Hello Christian,
 Thanks for additional information! As I said in my mail, it because of
 mutex initialization, which is done twice -- either while loading if_tun.ko,
 or if_ppp.ko. I reported this earlier to one of developers, but even I
 didn't like my patches. It only happens with debugging options enabled in
 your kernel configuration. This is due assertion made in mtx_init()
 (/sys/kern/kern_mutex.c):
 
         KASSERT((lock->lo_flags & LO_INITIALIZED) == 0,
             ("mutex \"%s\" %p already initialized", name, m));
 
 Christian proposed solution with MODULE_VERSION, but my question is: do we
 really need KASSERT in mtx_init()? Couldn't it just be replaced with
 conditional printf()?:
 http://freebsd.czest.pl/dunstan/FreeBSD/diff.0.kern_mutex.c
 
 Regards,
 -- 
 * Wojciech A. Koszek && dunstan at FreeBSD.czest.pl


More information about the freebsd-bugs mailing list