Commit 4f5ce686 authored by Daniil Tatianin's avatar Daniil Tatianin Committed by sanglipeng
Browse files

qed/qed_sriov: guard against NULL derefs from qed_iov_get_vf_info

stable inclusion
from stable-v5.10.177
commit 39c3b9dd481c3afce9439b29bafe00444cb4406b
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I88YNP

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



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

[ Upstream commit 25143b6a ]

We have to make sure that the info returned by the helper is valid
before using it.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Fixes: f990c82c ("qed*: Add support for ndo_set_vf_trust")
Fixes: 733def6a ("qed*: IOV link control")
Signed-off-by: default avatarDaniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.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 cac2e672
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment