Message ID | 20230104121558.38969-1-pchelkin@ispras.ru (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [v3] wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Fedor Pchelkin <pchelkin@ispras.ru> writes: > It is stated that ath9k_htc_rx_msg() either frees the provided skb or > passes its management to another callback function. However, the skb is > not freed in case there is no another callback function, and Syzkaller was > able to cause a memory leak. Also minor comment fix. The comment fix seems to be missing from this version? So either it should be reinstated, or the commit message updated to not mention it... -Toke
diff --git a/drivers/net/wireless/ath/ath9k/htc_hst.c b/drivers/net/wireless/ath/ath9k/htc_hst.c index ca05b07a45e6..0c95f6b145ff 100644 --- a/drivers/net/wireless/ath/ath9k/htc_hst.c +++ b/drivers/net/wireless/ath/ath9k/htc_hst.c @@ -478,6 +478,8 @@ void ath9k_htc_rx_msg(struct htc_target *htc_handle, if (endpoint->ep_callbacks.rx) endpoint->ep_callbacks.rx(endpoint->ep_callbacks.priv, skb, epid); + else + goto invalid; } }