Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Aug 2004 22:54:56 +0100 (BST)
From:      Mike Bristow <mike@lir.urgle.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/70189: [patch] vr(4) implements panic(9)
Message-ID:  <200408082154.i78Lsumx029418@lir.urgle.com>
Resent-Message-ID: <200408082200.i78M0cOe028204@freefall.freebsd.org>

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

>Number:         70189
>Category:       kern
>Synopsis:       [patch] vr(4) implements panic(9)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 08 22:00:38 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Mike Bristow
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD lir.urgle.com 5.2-CURRENT FreeBSD 5.2-CURRENT #2: Sun Aug 8 14:00:07 BST 2004 root@:/scratch/usr.obj/usr/src/sys/GENERIC i386

Panic observed on system cvsuped with
*default date=2004.07.27.00.00.00

fix tested on that and also
*default date=2004.08.07.00.00.00

>Description:

	Kernel panics at boot with:
panic: mutex vr0 not owned at /usr/src/sys/pci/if_vr.c:571
cpuid=1;
KDB: enter: panic
[thread 100077]
Stopped at      kdb_enter+0x30: leave

db> trace
kdb_enter(...)
panic(...)
_mtx_assert(...)
vr_setcfg(...)
vr_miibus_statchg(...)
miibus_statchg(...)
mii_phy_update(...)
amphy_service(...)
mii_pollstat(...)
vr_ifmedia_sts(...)
ifmedia_ioctl(...)
vr_ioctl(...)
ifhwioctl(...)
ifioctl(...)
soo_ioctl(...)
ioctl(...)
syscakk(...)
Xint0x80_syscall(...)


	
>How-To-Repeat:
	Fit NIC driven by vr(4); try to use!
>Fix:

Apply:

--- sys/pci/if_vr.c.orig	Sat Aug  7 12:57:45 2004
+++ sys/pci/if_vr.c	Sat Aug  7 12:58:53 2004
@@ -1561,7 +1561,9 @@
 	struct mii_data		*mii;
 
 	mii = device_get_softc(sc->vr_miibus);
+	VR_LOCK(sc);
 	mii_pollstat(mii);
+	VR_UNLOCK(sc);
 	ifmr->ifm_active = mii->mii_media_active;
 	ifmr->ifm_status = mii->mii_media_status;
 }
>Release-Note:
>Audit-Trail:
>Unformatted:



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