mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
wifi: rtlwifi: pci: wait for firmware loading before releasing memory
At probe error path, the firmware loading work may have already been
queued. In such a case, it will try to access memory allocated by the probe
function, which is about to be released. In such paths, wait for the
firmware worker to finish before releasing memory.
Fixes: 3d86b93064 ("rtlwifi: Fix PCI probe error path orphaned memory")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20241206173713.3222187-5-cascardo@igalia.com
This commit is contained in:
parent
e7ceefbfd8
commit
b59b86c5d0
|
|
@ -2218,6 +2218,7 @@ int rtl_pci_probe(struct pci_dev *pdev,
|
|||
fail4:
|
||||
rtl_deinit_core(hw);
|
||||
fail3:
|
||||
wait_for_completion(&rtlpriv->firmware_loading_complete);
|
||||
rtlpriv->cfg->ops->deinit_sw_vars(hw);
|
||||
|
||||
fail2:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user