Commit 1864a133 authored by Yufeng Mo's avatar Yufeng Mo Committed by Zheng Zengkai
Browse files

net: hns3: add a check for tqp_index in hclge_get_ring_chain_from_mbx()



stable inclusion
from stable-5.10.17
commit 2c0e46258eab60dfa447d0ab7e316478f0f852a3
bugzilla: 48169

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

[ Upstream commit 326334aa ]

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

Fixes: 84e095d6 ("net: hns3: Change PF to add ring-vect binding & resetQ to mailbox")
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 750cf490
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment