]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: iwlwifi: Fix error code in iwl_op_mode_dvm_start()
authorDan Carpenter <dan.carpenter@linaro.org>
Tue, 1 Jul 2025 18:08:42 +0000 (13:08 -0500)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Thu, 3 Jul 2025 05:57:57 +0000 (08:57 +0300)
Preserve the error code if iwl_setup_deferred_work() fails.  The current
code returns ERR_PTR(0) (which is NULL) on this path.  I believe the
missing error code potentially leads to a use after free involving
debugfs.

Fixes: 90a0d9f33996 ("iwlwifi: Add missing check for alloc_ordered_workqueue")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/a7a1cd2c-ce01-461a-9afd-dbe535f8df01@sabinyo.mountain
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/dvm/main.c

index e015b83bb6e9b887e50f78cb03251c6ea50cd5b2..2b4dbebc71c2e838dc114d168fe53ea3be94db6d 100644 (file)
@@ -1467,7 +1467,8 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
        /********************
         * 6. Setup services
         ********************/
-       if (iwl_setup_deferred_work(priv))
+       err = iwl_setup_deferred_work(priv);
+       if (err)
                goto out_uninit_drv;
 
        iwl_setup_rx_handlers(priv);