Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: panic on shutdown



On Sat, Dec 08, 2018 at 10:32:45AM +0100, Stefan Hertenberger wrote:
> Hello,
> 
> most of the time current panics on shutdown. Should i file a bug report?
> 
> thanks 
> Stefan
> 
> [...]
> (gdb) bt
> #0  0xffffffff80222d75 in cpu_reboot ()
> #1  0xffffffff8076f4f8 in db_sync_cmd ()
> #2  0xffffffff8076fcf2 in db_command ()
> #3  0xffffffff8077006c in db_command_loop ()
> #4  0xffffffff807739e0 in db_trap ()
> #5  0xffffffff8021f5c2 in kdb_trap ()
> #6  0xffffffff802244b1 in trap ()
> #7  0xffffffff8021d568 in alltraps ()
> #8  0xffffffff803db031 in msk_rxeof ()
> #9  0xffffffff803db840 in msk_intr ()
> #10 0xffffffff8023f0f9 in intr_biglock_wrapper ()
> #11 0xffffffff8020d216 in Xhandle_ioapic_edge18 ()
> #12 0xffffffff8021dee0 in ?? ()
> #13 0xffffffff8098b478 in _kernel_lock ()
> #14 0xffffffff809b712a in callout_softclock ()
> #15 0xffffffff809ab165 in softint_dispatch ()
> #16 0xffffffff8021d21f in Xsoftintr ()

Can you try the attached patch ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: if_msk.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/if_msk.c,v
retrieving revision 1.80
diff -u -p -u -r1.80 if_msk.c
--- if_msk.c	13 Nov 2018 19:39:04 -0000	1.80
+++ if_msk.c	8 Dec 2018 11:19:31 -0000
@@ -1299,7 +1299,7 @@ msk_detach(device_t self, int flags)
 	if (sc->sk_if[sc_if->sk_port] == NULL)
 		return (0);
 
-	msk_stop(ifp, 0);
+	msk_stop(ifp, 1);
 
 	if (--sc->rnd_attached == 0)
 		rnd_detach_source(&sc->rnd_source);
@@ -2244,10 +2244,12 @@ msk_intr(void *xsc)
 		switch (cur_st->sk_opcode) {
 		case SK_Y2_STOPC_RXSTAT:
 			sc_if = sc->sk_if[cur_st->sk_link & 0x01];
-			msk_rxeof(sc_if, letoh16(cur_st->sk_len),
-			    letoh32(cur_st->sk_status));
-			if (sc_if->sk_cdata.sk_rx_cnt < (MSK_RX_RING_CNT/3))
-				msk_fill_rx_tick(sc_if);
+			if (sc_if) {
+				msk_rxeof(sc_if, letoh16(cur_st->sk_len),
+				    letoh32(cur_st->sk_status));
+				if (sc_if->sk_cdata.sk_rx_cnt < (MSK_RX_RING_CNT/3))
+					msk_fill_rx_tick(sc_if);
+			}
 			break;
 		case SK_Y2_STOPC_TXSTAT:
 			if (sc_if0)


Home | Main Index | Thread Index | Old Index