Patch "wifi: ath12k: fix memory leak in ath12k_dp_rx_peer_frag_setup()" has been added to the 6.10-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: ath12k: fix memory leak in ath12k_dp_rx_peer_frag_setup()

to the 6.10-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-ath12k-fix-memory-leak-in-ath12k_dp_rx_peer_fra.patch
and it can be found in the queue-6.10 subdirectory.

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



commit ff178d8b532a407e5ef2a9c4c5b6636a28ffb4f4
Author: Baochen Qiang <quic_bqiang@xxxxxxxxxxx>
Date:   Sun May 26 20:42:26 2024 +0800

    wifi: ath12k: fix memory leak in ath12k_dp_rx_peer_frag_setup()
    
    [ Upstream commit 3d60041543189438cd1b03a1fa40ff6681c77970 ]
    
    Currently the resource allocated by crypto_alloc_shash() is not
    freed in case ath12k_peer_find() fails, resulting in memory leak.
    
    Add crypto_free_shash() to fix it.
    
    This is found during code review, compile tested only.
    
    Signed-off-by: Baochen Qiang <quic_bqiang@xxxxxxxxxxx>
    Acked-by: Jeff Johnson <quic_jjohnson@xxxxxxxxxxx>
    Signed-off-by: Kalle Valo <quic_kvalo@xxxxxxxxxxx>
    Link: https://msgid.link/20240526124226.24661-1-quic_bqiang@xxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c
index 121f27284be59..1d287ed25a949 100644
--- a/drivers/net/wireless/ath/ath12k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_rx.c
@@ -2793,6 +2793,7 @@ int ath12k_dp_rx_peer_frag_setup(struct ath12k *ar, const u8 *peer_mac, int vdev
 	peer = ath12k_peer_find(ab, vdev_id, peer_mac);
 	if (!peer) {
 		spin_unlock_bh(&ab->base_lock);
+		crypto_free_shash(tfm);
 		ath12k_warn(ab, "failed to find the peer to set up fragment info\n");
 		return -ENOENT;
 	}




[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