From patchwork Tue Aug 6 13:16:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Abreu X-Patchwork-Id: 11078905 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7FE771395 for ; Tue, 6 Aug 2019 13:16:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F8FA2832D for ; Tue, 6 Aug 2019 13:16:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6388B28893; Tue, 6 Aug 2019 13:16:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF7ED28553 for ; Tue, 6 Aug 2019 13:16:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=0GOGa/6Zeu0etGEIbuPvxDVoSxmC4BQxFw8o6CKC3Dw=; b=GMx3XD2K/mwETtQB1aiZ9D9wsr JWpxUyOxbuw5RroUaJxWjxRdbmV62sj9zYcs6Zxv7eBtvwMllqUOeGTUTr1yGJtbUkbJxCfon+67K 4c6NaDV4W7rnxkawPw3YRZoqZdDUbY4bI1lQPdkw1p5WRzTEyL4tuFShf0VoUS+odntwy3Jg4G8yg QuVV/9Nrrv9dEIgnzGked9pccImDv0I2Y5nPlgXfRDxpzJ3h7GjFPcLhTFfGB8gk1QnKbaYZzItw8 IVMHHOnevvUOZay6heT8McPY2QeAM4PnLdWVCB34r9oeGDExQNtd5+Y7l0uNSew2ATr0p9+hcs+Dj lXOOpOjw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1huzKH-0007UZ-G0; Tue, 06 Aug 2019 13:16:29 +0000 Received: from smtprelay-out1.synopsys.com ([198.182.47.102]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1huzKE-0007TH-Qz for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2019 13:16:28 +0000 Received: from mailhost.synopsys.com (mdc-mailhost2.synopsys.com [10.225.0.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 1D2A1C21BE; Tue, 6 Aug 2019 13:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1565097385; bh=opvibQbBIJ9hPlS0cfa2HRwHJqvFyO5wQchN17Kouis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:In-Reply-To: References:From; b=gl65vyO70WuPrNU99j3+rcaGPQE9v0MaLBbO4SGX4mm4j9niN+dkuOcxlB9oHrywT QLhGyx7fW7cJrz6Wis3wMyWcsD8h+bitUGhRVJdlpAvVVH7e88SDzKnlAwwRuy4GL+ Gk2BTFjbWpkdbm04W89UapSOgCJ3aPayfkvR7VtKJ8nVqFa/F1H2UIhPaHTwK32YLd t9oHylsakXSlhCNzy0AdaVcqK+tUnALY3Whj+ZArNFtPtI9QUsmHDjjP2QJBjjH0dt oNRP3f1vnGgxK+q9Lx+2M0gFrn6xya1rua9kTjmEmwdqSoReL+Sph+zX0Y+Yo71Jhf X50G6IQE6yMEA== Received: from de02dwia024.internal.synopsys.com (de02dwia024.internal.synopsys.com [10.225.19.81]) by mailhost.synopsys.com (Postfix) with ESMTP id CF8E8A0066; Tue, 6 Aug 2019 13:16:23 +0000 (UTC) From: Jose Abreu To: netdev@vger.kernel.org Subject: [PATCH net 3/3] net: stmmac: tc: Do not return a fragment entry Date: Tue, 6 Aug 2019 15:16:18 +0200 Message-Id: <67f380701fc127022e1d5a0922725bdf1bc185f4.1565097294.git.joabreu@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190806_061626_886674_BA09AA54 X-CRM114-Status: GOOD ( 12.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jose Abreu , Joao Pinto , Alexandre Torgue , linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , Giuseppe Cavallaro , "David S. Miller" , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Do not try to return a fragment entry from TC list. Otherwise we may not clean properly allocated entries. Signed-off-by: Jose Abreu --- Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c index 58ea18af9813..37c0bc699cd9 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -37,7 +37,7 @@ static struct stmmac_tc_entry *tc_find_entry(struct stmmac_priv *priv, entry = &priv->tc_entries[i]; if (!entry->in_use && !first && free) first = entry; - if (entry->handle == loc && !free) + if ((entry->handle == loc) && !free && !entry->is_frag) dup = entry; }