Commit 7f8a62db authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo

ath10k: plug possible memory leak in WMI

There was a possible memory leak when WMI command
queue reached it's limit. Command buffers were not
freed.
Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent dfa95b50
...@@ -110,6 +110,7 @@ static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, ...@@ -110,6 +110,7 @@ static int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb,
if (atomic_add_return(1, &ar->wmi.pending_tx_count) > if (atomic_add_return(1, &ar->wmi.pending_tx_count) >
WMI_MAX_PENDING_TX_COUNT) { WMI_MAX_PENDING_TX_COUNT) {
/* avoid using up memory when FW hangs */ /* avoid using up memory when FW hangs */
dev_kfree_skb(skb);
atomic_dec(&ar->wmi.pending_tx_count); atomic_dec(&ar->wmi.pending_tx_count);
return -EBUSY; return -EBUSY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment