diff options
author | Navid Emamdoost <navid.emamdoost@gmail.com> | 2020-07-23 05:58:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-05 11:06:53 +0300 |
commit | 11e2db546c1bf909a0381415590c45bb5fb88d12 (patch) | |
tree | 65ad7860d99d408bef38e70d669f3c7b67ee8b55 /drivers/net/ethernet/chelsio/cxgb4/sge.c | |
parent | cc5324cc0cae449e232931623cb0436f1acbb3e6 (diff) | |
download | linux-11e2db546c1bf909a0381415590c45bb5fb88d12.tar.xz |
cxgb4: add missing release on skb in uld_send()
[ Upstream commit e6827d1abdc9b061a57d7b7d3019c4e99fabea2f ]
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/sge.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/sge.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index 0a5c4c7da505..006f8b8aaa7d 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -1812,6 +1812,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; } |