From: stsp Date: Sun, 31 Oct 2021 12:17:54 +0000 (+0000) Subject: Raise SPL to IPL_NET in run_next_scan() to avoid splassert failures. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ac5ee5982a816665d8a5405dccee52c762dcc7cf;p=openbsd Raise SPL to IPL_NET in run_next_scan() to avoid splassert failures. Problem found and fix tested by krw@. ok krw@ --- 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); }