Skip to content

Commit

Permalink
net: stmmac: tc: Do not return a fragment entry
Browse files Browse the repository at this point in the history
[ Upstream commit 4a6a138 ]

Do not try to return a fragment entry from TC list. Otherwise we may not
clean properly allocated entries.

Signed-off-by: Jose Abreu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
joabreu authored and gregkh committed Aug 29, 2019
1 parent b6cd6d1 commit b8d03c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b8d03c7

Please sign in to comment.