Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b8d03c79 authored by Jose Abreu's avatar Jose Abreu Committed by Greg Kroah-Hartman
Browse files

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: default avatarJose Abreu <joabreu@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b6cd6d18
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}