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: <20170428125608.djln5r7h4d53it5s@mwanda>
Date:   Fri, 28 Apr 2017 15:56:09 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Yuval Mintz <Yuval.Mintz@...ium.com>
Cc:     Ariel Elior <Ariel.Elior@...ium.com>, everest-linux-l2@...ium.com,
        netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH net] qed: Unlock on error in qed_vf_pf_acquire()

My static checker complains that we're holding a mutex on this error
path.  Let's goto exit instead of returning directly.

Fixes: b0bccb69eba3 ("qed: Change locking scheme for VF channel")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
Yuval, could you review this one a bit carefully and also check that my
Fixes tag is correct because I'm not certain.

diff --git a/drivers/net/ethernet/qlogic/qed/qed_vf.c b/drivers/net/ethernet/qlogic/qed/qed_vf.c
index c4c4a408b40b..11d71e5eea14 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_vf.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_vf.c
@@ -234,7 +234,7 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
 		/* send acquire request */
 		rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
 		if (rc)
-			return rc;
+			goto exit;
 
 		/* copy acquire response from buffer to p_hwfn */
 		memcpy(&p_iov->acquire_resp, resp, sizeof(p_iov->acquire_resp));

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ