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>] [day] [month] [year] [list]
Message-ID: <BYAPR15MB263181A19484772A18872C8D99879@BYAPR15MB2631.namprd15.prod.outlook.com>
Date:   Mon, 11 Jul 2022 16:21:41 +0000
From:   Bernard Metzler <BMT@...ich.ibm.com>
To:     Andrey Strachuk <strochuk@...ras.ru>
CC:     Jason Gunthorpe <jgg@...pe.ca>, Leon Romanovsky <leon@...nel.org>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "ldv-project@...uxtesting.org" <ldv-project@...uxtesting.org>
Subject: RE: [PATCH] RDMA: remove useless condition in siw_create_cq()

> -----Original Message-----
> From: Andrey Strachuk <strochuk@...ras.ru>
> Sent: Monday, 11 July 2022 17:13
> To: Bernard Metzler <BMT@...ich.ibm.com>
> Cc: Andrey Strachuk <strochuk@...ras.ru>; Jason Gunthorpe <jgg@...pe.ca>;
> Leon Romanovsky <leon@...nel.org>; linux-rdma@...r.kernel.org; linux-
> kernel@...r.kernel.org; ldv-project@...uxtesting.org
> Subject: [EXTERNAL] [PATCH] RDMA: remove useless condition in
> siw_create_cq()
> 
> Comparison of 'cq' with NULL is useless since
> 'cq' is a result of container_of and cannot be NULL
> in any reasonable scenario.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Andrey Strachuk <strochuk@...ras.ru>
> Fixes: 303ae1cdfdf7 ("rdma/siw: application interface")
> ---
>  drivers/infiniband/sw/siw/siw_verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/sw/siw/siw_verbs.c
> b/drivers/infiniband/sw/siw/siw_verbs.c
> index 09316072b789..8dedae7ae79e 100644
> --- a/drivers/infiniband/sw/siw/siw_verbs.c
> +++ b/drivers/infiniband/sw/siw/siw_verbs.c
> @@ -1167,7 +1167,7 @@ int siw_create_cq(struct ib_cq *base_cq, const struct
> ib_cq_init_attr *attr,
>  err_out:
>  	siw_dbg(base_cq->device, "CQ creation failed: %d", rv);
> 
> -	if (cq && cq->queue) {
> +	if (cq->queue) {
>  		struct siw_ucontext *ctx =
>  			rdma_udata_to_drv_context(udata, struct siw_ucontext,
>  						  base_ucontext);
> --
> 2.25.1

Acked-by: Bernard Metzler <bmt@...ich.ibm.com>

Thanks Andrey!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ