Message ID | 20200723025841.22535-1-navid.emamdoost@gmail.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | [v3] cxgb4: add missing release on skb in uld_send() | expand |
From: Navid Emamdoost <navid.emamdoost@gmail.com> Date: Wed, 22 Jul 2020 21:58:39 -0500 > In the implementation of uld_send(), the skb is consumed on all > execution paths except one. Release skb when returning NET_XMIT_DROP. > > Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Applied, thank you.
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index 32a45dc51ed7..92eee66cbc84 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -2938,6 +2938,7 @@ static inline int uld_send(struct adapter *adap, struct sk_buff *skb, txq_info = adap->sge.uld_txq_info[tx_uld_type]; if (unlikely(!txq_info)) { WARN_ON(true); + kfree_skb(skb); return NET_XMIT_DROP; }
In the implementation of uld_send(), the skb is consumed on all execution paths except one. Release skb when returning NET_XMIT_DROP. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> --- v3: - fixed the base problem, and used kfree_skb --- drivers/net/ethernet/chelsio/cxgb4/sge.c | 1 + 1 file changed, 1 insertion(+)