Patch "wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup" has been added to the 6.1-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: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup

to the 6.1-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-ath11k-fix-memory-leak-in-ath11k_peer_rx_frag_s.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 72ecec2915ba866e69a5d03cf388ee2363d1d96c
Author: Miaoqian Lin <linmq006@xxxxxxxxx>
Date:   Mon Jan 2 12:11:42 2023 +0400

    wifi: ath11k: Fix memory leak in ath11k_peer_rx_frag_setup
    
    [ Upstream commit ed3f83b3459a67a3ab9d806490ac304b567b1c2d ]
    
    crypto_alloc_shash() allocates resources, which should be released by
    crypto_free_shash(). When ath11k_peer_find() fails, there has memory
    leak. Add missing crypto_free_shash() to fix this.
    
    Fixes: 243874c64c81 ("ath11k: handle RX fragments")
    Signed-off-by: Miaoqian Lin <linmq006@xxxxxxxxx>
    Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>
    Signed-off-by: Kalle Valo <quic_kvalo@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230102081142.3937570-1-linmq006@xxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index c5a4c34d77499..0c53d88293eb7 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -3126,6 +3126,7 @@ int ath11k_peer_rx_frag_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id
 	if (!peer) {
 		ath11k_warn(ab, "failed to find the peer to set up fragment info\n");
 		spin_unlock_bh(&ab->base_lock);
+		crypto_free_shash(tfm);
 		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