NetBSD-Bugs archive

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

re: kern/56489: NetBSD 9.99.92/amd64 panicked by aircrack-ng



> [    78.456879] Mutex error: mutex_vector_enter,549: locking against myself

ah, yes.  ok, can you try this more targetted change?

thanks.  might be with trying without the 2nd chunk if
you still see a problem.



Index: if_urtwn.c
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/if_urtwn.c,v
retrieving revision 1.101
diff -p -u -r1.101 if_urtwn.c
--- if_urtwn.c	21 Oct 2021 20:18:16 -0000	1.101
+++ if_urtwn.c	8 Nov 2021 23:20:05 -0000
@@ -3034,9 +3034,11 @@ urtwn_ioctl(struct ifnet *ifp, u_long cm
 		error = ieee80211_ioctl(ic, cmd, data);
 		if (error == ENETRESET &&
 		    ic->ic_opmode == IEEE80211_M_MONITOR) {
+			mutex_enter(&sc->sc_write_mtx);
 			urtwn_set_chan(sc, ic->ic_curchan,
 			    IEEE80211_HTINFO_2NDCHAN_NONE);
 			error = 0;
+			mutex_exit(&sc->sc_write_mtx);
 		}
 		break;
 
@@ -5061,7 +5063,9 @@ urtwn_reset(struct ifnet *ifp)
 	if (ic->ic_opmode != IEEE80211_M_MONITOR)
 		return ENETRESET;
 
+	mutex_enter(&sc->sc_write_mtx);
 	urtwn_set_chan(sc, ic->ic_curchan, IEEE80211_HTINFO_2NDCHAN_NONE);
+	mutex_exit(&sc->sc_write_mtx);
 
 	return 0;
 }


Home | Main Index | Thread Index | Old Index