CVSROOT: /cvs Module name: src Changes by: s...@cvs.openbsd.org 2021/07/20 08:44:37
Modified files: sys/dev/pci : if_iwm.c Log message: Make iwm_init() call iwm_stop() if we fail to move into SCAN state. Generally, iwm_init() must either succeed or reset everything. In the case I observed, the missing call to iwm_stop() left us with a non-zero refcount for the newstate task which failed to perform the INIT -> SCAN transition. The next ioctl request from userspace would then trigger a KASSERT in iwm_init() which checks for old tasks that haven't run to completion. This problem won't happen under normal conditions. It will happen if the firmware crashes in response to a bad scan command, for instance. I ran into this while working on support for newer iwx(4) firmware.