Patch "wifi: libertas: Fix possible refcount leak in if_usb_probe()" has been added to the 4.19-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: libertas: Fix possible refcount leak in if_usb_probe()

to the 4.19-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-libertas-fix-possible-refcount-leak-in-if_usb_p.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 11b1ed72ec696b51e99828ee585e6b85a91f271b
Author: Hangyu Hua <hbh25y@xxxxxxxxx>
Date:   Mon Jun 20 17:23:50 2022 +0800

    wifi: libertas: Fix possible refcount leak in if_usb_probe()
    
    [ Upstream commit 6fd57e1d120bf13d4dc6c200a7cf914e6347a316 ]
    
    usb_get_dev will be called before lbs_get_firmware_async which means that
    usb_put_dev need to be called when lbs_get_firmware_async fails.
    
    Fixes: ce84bb69f50e ("libertas USB: convert to asynchronous firmware loading")
    Signed-off-by: Hangyu Hua <hbh25y@xxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220620092350.39960-1-hbh25y@xxxxxxxxx
    Link: https://lore.kernel.org/r/20220622113402.16969-1-colin.i.king@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/marvell/libertas/if_usb.c b/drivers/net/wireless/marvell/libertas/if_usb.c
index f29a154d995c..d75763410cdc 100644
--- a/drivers/net/wireless/marvell/libertas/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas/if_usb.c
@@ -283,6 +283,7 @@ static int if_usb_probe(struct usb_interface *intf,
 	return 0;
 
 err_get_fw:
+	usb_put_dev(udev);
 	lbs_remove_card(priv);
 err_add_card:
 	if_usb_reset_device(cardp);



[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