]> www.infradead.org Git - users/jedix/linux-maple.git/commit
qed/qed_sriov: guard against NULL derefs from qed_iov_get_vf_info
authorDaniil Tatianin <d-tatianin@yandex-team.ru>
Thu, 16 Mar 2023 10:29:21 +0000 (13:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2023 10:49:04 +0000 (12:49 +0200)
commit97ea704f39b5ded96f071e98701aa543f6f89683
tree05d8959a48906f91e7dce79e96e8c71408fc0b89
parent58c11bc7adaa8c6a369bf1a6baaf213c467073bd
qed/qed_sriov: guard against NULL derefs from qed_iov_get_vf_info

[ Upstream commit 25143b6a01d0cc5319edd3de22ffa2578b045550 ]

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: f990c82c385b ("qed*: Add support for ndo_set_vf_trust")
Fixes: 733def6a04bf ("qed*: IOV link control")
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_sriov.c