* [PATCH next] wifi: iwlwifi: Fix error code in iwl_op_mode_dvm_start()
@ 2025-07-01 18:08 Dan Carpenter
2025-07-02 8:00 ` Korenblit, Miriam Rachel
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-07-01 18:08 UTC (permalink / raw)
To: Jiasheng Jiang
Cc: Miri Korenblit, Johannes Berg, Emmanuel Grumbach, linux-wireless,
linux-kernel, kernel-janitors
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>
---
drivers/net/wireless/intel/iwlwifi/dvm/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c b/drivers/net/wireless/intel/iwlwifi/dvm/main.c
index e015b83bb6e9..2b4dbebc71c2 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c
@@ -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);
--
2.47.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH next] wifi: iwlwifi: Fix error code in iwl_op_mode_dvm_start()
2025-07-01 18:08 [PATCH next] wifi: iwlwifi: Fix error code in iwl_op_mode_dvm_start() Dan Carpenter
@ 2025-07-02 8:00 ` Korenblit, Miriam Rachel
0 siblings, 0 replies; 2+ messages in thread
From: Korenblit, Miriam Rachel @ 2025-07-02 8:00 UTC (permalink / raw)
To: Dan Carpenter, Jiasheng Jiang
Cc: Berg, Johannes, Grumbach, Emmanuel, linux-wireless, linux-kernel,
kernel-janitors
> Fixes: 90a0d9f33996 ("iwlwifi: Add missing check for alloc_ordered_workqueue")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
FYI,
I'll squash it into the original commit ("iwlwifi: Add missing check for alloc_ordered_workqueue")
Miri
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-02 8:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-01 18:08 [PATCH next] wifi: iwlwifi: Fix error code in iwl_op_mode_dvm_start() Dan Carpenter
2025-07-02 8:00 ` Korenblit, Miriam Rachel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®