From ac5ee5982a816665d8a5405dccee52c762dcc7cf Mon Sep 17 00:00:00 2001 From: stsp Date: Sun, 31 Oct 2021 12:17:54 +0000 Subject: [PATCH] Raise SPL to IPL_NET in run_next_scan() to avoid splassert failures. Problem found and fix tested by krw@. ok krw@ --- sys/dev/usb/if_run.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c index 7759d6e0cea..4da2468c393 100644 --- a/sys/dev/usb/if_run.c +++ b/sys/dev/usb/if_run.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_run.c,v 1.132 2020/11/27 14:45:03 krw Exp $ */ +/* $OpenBSD: if_run.c,v 1.133 2021/10/31 12:17:54 stsp Exp $ */ /*- * Copyright (c) 2008-2010 Damien Bergamini @@ -1701,14 +1701,17 @@ void run_next_scan(void *arg) { struct run_softc *sc = arg; + int s; if (usbd_is_dying(sc->sc_udev)) return; usbd_ref_incr(sc->sc_udev); + s = splnet(); if (sc->sc_ic.ic_state == IEEE80211_S_SCAN) ieee80211_next_scan(&sc->sc_ic.ic_if); + splx(s); usbd_ref_decr(sc->sc_udev); } -- 2.20.1