Commit 4316a253 authored by Wei Fang's avatar Wei Fang Committed by sanglipeng
Browse files

net: enetc: check the index of the SFI rather than the handle

stable inclusion
from stable-v5.10.180
commit 796616f216d06269aabc4e7801f251f6f9c1c364
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8FC2O

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=796616f216d06269aabc4e7801f251f6f9c1c364



--------------------------------

[ Upstream commit 299efdc2 ]

We should check whether the current SFI (Stream Filter Instance) table
is full before creating a new SFI entry. However, the previous logic
checks the handle by mistake and might lead to unpredictable behavior.

Fixes: 888ae5a3 ("net: enetc: add tc flower psfp offload driver")
Signed-off-by: default avatarWei Fang <wei.fang@nxp.com>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 58225e65
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment