Skip to content

Commit

Permalink
cxgb4: add missing release on skb in uld_send()
Browse files Browse the repository at this point in the history
[ Upstream commit e6827d1 ]

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>
  • Loading branch information
Navid Emamdoost authored and Greg Kroah-Hartman committed Aug 5, 2020
1 parent 243534a commit ef47367
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/chelsio/cxgb4/sge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2925,6 +2925,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;
}

Expand Down

0 comments on commit ef47367

Please sign in to comment.