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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200727143604.3835-1-alobakin@marvell.com>
Date:   Mon, 27 Jul 2020 17:36:04 +0300
From:   Alexander Lobakin <alobakin@...vell.com>
To:     Colin King <colin.king@...onical.com>
CC:     Alexander Lobakin <alobakin@...vell.com>,
        Michal Kalderon <mkalderon@...vell.com>,
        Ariel Elior <aelior@...vell.com>,
        Doug Ledford <dledford@...hat.com>,
        Jason Gunthorpe <jgg@...pe.ca>,
        Igor Russkikh <irusskikh@...vell.com>,
        "David S. Miller" <davem@...emloft.net>,
        <linux-rdma@...r.kernel.org>, <kernel-janitors@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] qed: fix assignment of n_rq_elems to incorrect params field

Hi Colin,

From: Colin King <colin.king@...onical.com>
Date: Mon, 27 Jul 2020 15:17:12 +0100

> From: Colin Ian King <colin.king@...onical.com>
> 
> Currently n_rq_elems is being assigned to params.elem_size instead of the
> field params.num_elems.  Coverity is detecting this as a double assingment
> to params.elem_size and reporting this as an usused value on the first
> assignment.  Fix this.
> 
> Addresses-Coverity: ("Unused value")
> Fixes: b6db3f71c976 ("qed: simplify chain allocation with init params struct")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/infiniband/hw/qedr/verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
> index 5a80471577a6..4ce4e2eef6cc 100644
> --- a/drivers/infiniband/hw/qedr/verbs.c
> +++ b/drivers/infiniband/hw/qedr/verbs.c
> @@ -1930,7 +1930,7 @@ qedr_roce_create_kernel_qp(struct qedr_dev *dev,
>  	in_params->sq_pbl_ptr = qed_chain_get_pbl_phys(&qp->sq.pbl);
>  
>  	params.intended_use = QED_CHAIN_USE_TO_CONSUME_PRODUCE;
> -	params.elem_size = n_rq_elems;
> +	params.num_elems = n_rq_elems;

Sorry for copy'n'paste braino. Thanks for catching.

>  	params.elem_size = QEDR_RQE_ELEMENT_SIZE;
>  
>  	rc = dev->ops->common->chain_alloc(dev->cdev, &qp->rq.pbl, &params);
> -- 
> 2.27.0

Acked-by: Alexander Lobakin <alobakin@...vell.com>

Al

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ