Commit 9eb3f1bc authored by Yufeng Mo's avatar Yufeng Mo Committed by Zheng Zengkai
Browse files

net: hns3: add a check for index in hclge_get_rss_key()



stable inclusion
from stable-5.10.17
commit 5ff69431b7633b1cfe30ceff58c6843aa7cb4d46
bugzilla: 48169

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

[ Upstream commit 532cfc0d ]

The index is received from vf, if use it directly,
an out-of-bound issue may be caused, so add a check for
this index before using it in hclge_get_rss_key().

Fixes: a638b1d8 ("net: hns3: fix get VF RSS issue")
Signed-off-by: default avatarYufeng Mo <moyufeng@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 1864a133
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment