* [PATCH] ath11k: fix missing free of skb on error return path
@ 2019-12-12 19:42 Colin King
2019-12-18 17:54 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-12-12 19:42 UTC (permalink / raw)
To: Kalle Valo, David S . Miller, Pradeep Kumar Chitrapu,
Ganesh Sesetti, Karthikeyan Periyasamy, John Crispin, ath11k,
linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The error handling when the call to ath11k_hal_srng_get_entrysize fails
leaks skb, fix this by returning via the err_free return path that will
ensure the skb is free'd.
Addresses-Coverity: ("Resource leak")
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath11k/dp_tx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index a8b9557c2346..7123a4fc4635 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -645,8 +645,10 @@ int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id,
HAL_ADDR_MSB_REG_SHIFT;
ret = ath11k_hal_srng_get_entrysize(ring_type);
- if (ret < 0)
- return -EINVAL;
+ if (ret < 0) {
+ ret = -EINVAL;
+ goto err_free;
+ }
ring_entry_sz = ret;
--
2.24.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath11k: fix missing free of skb on error return path
2019-12-12 19:42 [PATCH] ath11k: fix missing free of skb on error return path Colin King
@ 2019-12-18 17:54 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-12-18 17:54 UTC (permalink / raw)
To: Colin King
Cc: David S . Miller, Pradeep Kumar Chitrapu, Ganesh Sesetti,
Karthikeyan Periyasamy, John Crispin, ath11k, linux-wireless,
netdev, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> The error handling when the call to ath11k_hal_srng_get_entrysize fails
> leaks skb, fix this by returning via the err_free return path that will
> ensure the skb is free'd.
>
> Addresses-Coverity: ("Resource leak")
> Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Patch applied to ath-next branch of ath.git, thanks.
4358bcb54bb9 ath11k: fix missing free of skb on error return path
--
https://patchwork.kernel.org/patch/11289341/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-18 17:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-12 19:42 [PATCH] ath11k: fix missing free of skb on error return path Colin King
2019-12-18 17:54 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).