[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200722185722.3580-1-navid.emamdoost@gmail.com>
Date: Wed, 22 Jul 2020 13:57:21 -0500
From: Navid Emamdoost <navid.emamdoost@...il.com>
To: Vishal Kulkarni <vishal@...lsio.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: emamd001@....edu, Navid Emamdoost <navid.emamdoost@...il.com>
Subject: [PATCH v2] cxgb4: add missing release on skb in uld_send()
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@...il.com>
---
changes in v2:
- using kfree_skb() based on David Miller suggestion.
---
drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index d8c37fd4b808..92eee66cbc84 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -2938,7 +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);
- consume_skb(skb);
+ kfree_skb(skb);
return NET_XMIT_DROP;
}
--
2.17.1
Powered by blists - more mailing lists