Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2025555pxa; Mon, 3 Aug 2020 05:42:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzR+5S7xLqmnygWfqGgQakV2vwhw8FUwmeU+E9fr+q/ebNNKcn4yH0ev22K9IeB2u5gLPH4 X-Received: by 2002:a17:906:1453:: with SMTP id q19mr17005799ejc.111.1596458565299; Mon, 03 Aug 2020 05:42:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596458565; cv=none; d=google.com; s=arc-20160816; b=UWn2cD84ckqHRJgad9vdFhrLJo+2+Yhkqr2zKDsrflIjRiNjsGk9XVO6By3qw9g9Tw BO1AvwCC8xfnnVq/G6l0x6QlIKnCPUNaB9N44iziMYNeeCC/MqDEjlaHCJtvvuKlM5gQ hB5Lbs0d9ut8750dpQ9UjYrsWD9Tv6H0u4anGfiUVQTrj2QriHuvk6UnS7UfALXdaCjs aLOoXgs6DVcB8agYqe2QR6MizvALU8bjjkOkwyuBG45gW2L1IIKy0+tWGnIShMYFTymN b3goUoQfjIt2sQHdMaaYq9PPvPSiP/TEDXLrFYow1dk1fzoxmit3NfSViMjfmuWI/6bq eKug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/8HDs7c+gLCEsC2DIqJi3bxkRrvv/I1DJAHLMlLMENs=; b=i0QR9xsZnYCWoG+/iDkCzXhFAo2z0HZcawUzM+uCd8MUjl3gvBUKJAjUnUESk7ggru 82C/G5CvKg/4JtpMKuxRj7iNHzd5ZkP6N8UcdIblWcffE4lOX6Bh/6+a5pR5cFbmGfuY emCH0gj0JNUySMkt9j/BGnKsVoa5qRYjy1cMQYz3Vfivtz9ZaOtWfaCH9b3d5LCLYzUO K/9Mwl2l6dLv35sZ0YPDDkh/6Ufv45rxoSYlbxtbdM2QoMkZCz/5c6FJKrkydAqLBKu5 J4NvQXG33w/5bclX39q8gi0YtwsTTXnz6HqQUuI7O0bWZF8hBtdmqDHvfRlt4NTCkns8 6Lpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kau+9ZnP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u7si10436258ejn.161.2020.08.03.05.42.23; Mon, 03 Aug 2020 05:42:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Kau+9ZnP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729388AbgHCMkS (ORCPT + 99 others); Mon, 3 Aug 2020 08:40:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:32992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728962AbgHCMdI (ORCPT ); Mon, 3 Aug 2020 08:33:08 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9E9882054F; Mon, 3 Aug 2020 12:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596457987; bh=pOfsrTcmGvxL4USw2Stgyi30wbEKbO6BwaawdDfIvHU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kau+9ZnP3y6tEOXRNU6AgHXxbXMXcgvO1RHZt4e0BispVsf5ie12yJiyJR7PjpDfy +BXad1V/RTeo6UHW2eyXjmrk+fOywgqddTcg3oJSZT5IJozk9cU1MPD5elFyUbE2yH nFXe0KeCWyBuSWCdqstY3KCerQZ8Bgtj4x80uxsY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Navid Emamdoost , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 53/56] cxgb4: add missing release on skb in uld_send() Date: Mon, 3 Aug 2020 14:20:08 +0200 Message-Id: <20200803121852.925404448@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200803121850.306734207@linuxfoundation.org> References: <20200803121850.306734207@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Navid Emamdoost [ 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/chelsio/cxgb4/sge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c index 3d4a765e9e61d..7801f2aeeb30e 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c @@ -2367,6 +2367,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; } -- 2.25.1