Patch "mt76: mt76x02u: fix possible memory leak in __mt76x02u_mcu_send_msg" has been added to the 5.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

    mt76: mt76x02u: fix possible memory leak in __mt76x02u_mcu_send_msg

to the 5.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:
     mt76-mt76x02u-fix-possible-memory-leak-in-__mt76x02u.patch
and it can be found in the queue-5.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 ee2c465cc23ab3895a896021af8521b16607d61a
Author: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
Date:   Tue May 17 18:37:07 2022 +0200

    mt76: mt76x02u: fix possible memory leak in __mt76x02u_mcu_send_msg
    
    [ Upstream commit cffd93411575afd987788e2ec3cb8eaff70f0215 ]
    
    Free the skb if mt76u_bulk_msg fails in __mt76x02u_mcu_send_msg routine.
    
    Fixes: 4c89ff2c74e39 ("mt76: split __mt76u_mcu_send_msg and mt76u_mcu_send_msg routines")
    Co-developed-by: Gergo Koteles <soyer@xxxxxx>
    Signed-off-by: Gergo Koteles <soyer@xxxxxx>
    Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
    Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
index 2953df7d8388..c6c16fe8ee85 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c
@@ -108,7 +108,7 @@ __mt76x02u_mcu_send_msg(struct mt76_dev *dev, struct sk_buff *skb,
 	ret = mt76u_bulk_msg(dev, skb->data, skb->len, NULL, 500,
 			     MT_EP_OUT_INBAND_CMD);
 	if (ret)
-		return ret;
+		goto out;
 
 	if (wait_resp)
 		ret = mt76x02u_mcu_wait_resp(dev, seq);



[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