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: <1627036373-69929-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date:   Fri, 23 Jul 2021 18:32:53 +0800
From:   Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To:     mustafa.ismail@...el.com
Cc:     shiraz.saleem@...el.com, dledford@...hat.com, jgg@...pe.ca,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
        chongjiapeng <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] RDMA/irdma: Fix missing error code in irdma_modify_qp_roce()

From: chongjiapeng <jiapeng.chong@...ux.alibaba.com>

The error code is missing in this code scenario, add the error code
'-EINVAL' to the return value 'ret'.

Eliminate the follow smatch warning:

drivers/infiniband/hw/irdma/verbs.c:1344 irdma_modify_qp_roce() warn:
missing error code 'ret'.

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
Signed-off-by: chongjiapeng <jiapeng.chong@...ux.alibaba.com>
---
 drivers/infiniband/hw/irdma/verbs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 717147e..406c8b05 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -1341,6 +1341,7 @@ int irdma_modify_qp_roce(struct ib_qp *ibqp, struct ib_qp_attr *attr,
 			break;
 		case IB_QPS_SQD:
 			if (iwqp->iwarp_state == IRDMA_QP_STATE_SQD)
+				ret = -EINVAL;
 				goto exit;
 
 			if (iwqp->iwarp_state != IRDMA_QP_STATE_RTS) {
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ