lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230420082016.335314-1-d-tatianin@yandex-team.ru>
Date:   Thu, 20 Apr 2023 11:20:16 +0300
From:   Daniil Tatianin <d-tatianin@...dex-team.ru>
To:     Ariel Elior <aelior@...vell.com>
Cc:     Daniil Tatianin <d-tatianin@...dex-team.ru>,
        Manish Chopra <manishc@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Yuval Mintz <Yuval.Mintz@...gic.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH net] qed/qed_sriov: propagate errors from qed_init_run in enable_vf_access

The return value was silently ignored, and not propagated to the caller.

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

Fixes: 1408cc1fa48c ("qed: Introduce VFs")
Signed-off-by: Daniil Tatianin <d-tatianin@...dex-team.ru>
---
I'm not familiar enough with the code to know if there's anything we
have to undo here in case qed_init_run returns an error. Any additional
comments are appreciated.
---
 drivers/net/ethernet/qlogic/qed/qed_sriov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
index fa167b1aa019..5244d7208eb4 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
@@ -814,7 +814,7 @@ static int qed_iov_enable_vf_access(struct qed_hwfn *p_hwfn,
 	SET_FIELD(igu_vf_conf, IGU_VF_CONF_PARENT, p_hwfn->rel_pf_id);
 	STORE_RT_REG(p_hwfn, IGU_REG_VF_CONFIGURATION_RT_OFFSET, igu_vf_conf);
 
-	qed_init_run(p_hwfn, p_ptt, PHASE_VF, vf->abs_vf_id,
+	rc = qed_init_run(p_hwfn, p_ptt, PHASE_VF, vf->abs_vf_id,
 		     p_hwfn->hw_info.hw_mode);
 
 	/* unpretend */
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ