CVSROOT:        /cvs
Module name:    src
Changes by:     s...@cvs.openbsd.org    2021/07/20 08:44:09

Modified files:
        sys/dev/pci    : if_iwx.c 

Log message:
Make iwx_init() call iwx_stop() if we fail to move into SCAN state.

Generally, iwx_init() must either succeed or reset everything. In the case
I observed, the missing call to iwx_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
iwx_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.

Reply via email to