Patch "wifi: brcmfmac: avoid invalid list operation when vendor attach fails" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: brcmfmac: avoid invalid list operation when vendor attach fails

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-brcmfmac-avoid-invalid-list-operation-when-vend.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 06f37455be7cc24ebcfbcab7618ab8b1a034f8d6
Author: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Date:   Sat Jan 6 11:38:34 2024 +0100

    wifi: brcmfmac: avoid invalid list operation when vendor attach fails
    
    [ Upstream commit b822015a1f57268f5b2ff656736dc4004e7097da ]
    
    When the brcmf_fwvid_attach() fails the driver instance is not added
    to the vendor list. Hence we should not try to delete it from that
    list when the brcmf_fwvid_detach() function is called in cleanup path.
    
    Cc: stable@xxxxxxxxxxxxxxx # 6.2.x
    Fixes: d6a5c562214f ("wifi: brcmfmac: add support for vendor-specific firmware api")
    Signed-off-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://msgid.link/20240106103835.269149-3-arend.vanspriel@xxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
index 86eafdb405419..f610818c2b059 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
@@ -187,9 +187,10 @@ void brcmf_fwvid_detach_ops(struct brcmf_pub *drvr)
 
 	mutex_lock(&fwvid_list_lock);
 
-	drvr->vops = NULL;
-	list_del(&drvr->bus_if->list);
-
+	if (drvr->vops) {
+		drvr->vops = NULL;
+		list_del(&drvr->bus_if->list);
+	}
 	mutex_unlock(&fwvid_list_lock);
 }
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux