]> git.ipfire.org Git - thirdparty/kernel/stable.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:58:50 +0000 (09:58 +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 28ce9856a078403e98745eb9343796b8c928d505..0f5ca68c985426590810a19e58e2bd0397530350 100644 (file)
@@ -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;
        }