]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
cxgb4: add missing release on skb in uld_send()
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Thu, 23 Jul 2020 02:58:39 +0000 (21:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:59:51 +0000 (09:59 +0200)
[ 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>
drivers/net/ethernet/chelsio/cxgb4/sge.c

index 506170fe3a8b7ff60bf8f5263742106abf071f05..049f1bbe27ab32891e90e63be995210ca63db882 100644 (file)
@@ -2441,6 +2441,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;
        }