Skip to content

Commit 960c7e6

Browse files
committed
wifi: iwlwifi: mld: avoid panic on init failure
In case of an error during init, in_hw_restart will be set, but it will never get cleared. Instead, we will retry to init again, and then we will act like we are in a restart when we are actually not. This causes (among others) to a NULL pointer dereference when canceling rx_omi::finished_work, that was not even initialized, because we thought that we are in hw_restart. Set in_hw_restart to true only if the fw is running, then we know that FW was loaded successfully and we are not going to the retry loop. Fixes: 7391b2a ("wifi: iwlwifi: rework firmware error handling") Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://patch.msgid.link/20250604061200.e0040e0a4b09.Iae469a0abe6bfa3c26d8a88c066bad75c2e8f121@changeid Signed-off-by: Miri Korenblit <[email protected]>
1 parent 264c844 commit 960c7e6

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/wireless/intel/iwlwifi/mld

1 file changed

+2
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mld/mld.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,8 @@ iwl_mld_nic_error(struct iwl_op_mode *op_mode,
653653
* It might not actually be true that we'll restart, but the
654654
* setting doesn't matter if we're going to be unbound either.
655655
*/
656-
if (type != IWL_ERR_TYPE_RESET_HS_TIMEOUT)
656+
if (type != IWL_ERR_TYPE_RESET_HS_TIMEOUT &&
657+
mld->fw_status.running)
657658
mld->fw_status.in_hw_restart = true;
658659
}
659660

0 commit comments

Comments
 (0)