summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2019-08-06 16:16:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-29 09:28:43 +0300
commitb8d03c79e4033dc0d516e1d7ff14065439986a5c (patch)
tree3ac4aac79b60a6c7b47918bd466eaa7bd9d88299
parentb6cd6d18423eb59be98a361bfae40844de534c62 (diff)
downloadlinux-b8d03c79e4033dc0d516e1d7ff14065439986a5c.tar.xz
net: stmmac: tc: Do not return a fragment entry
[ Upstream commit 4a6a1385a4db5f42258a40fcd497cbfd22075968 ] Do not try to return a fragment entry from TC list. Otherwise we may not clean properly allocated entries. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c2
1 files changed, 1 insertions, 1 deletions
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;
}