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]
Date:   Mon, 1 Aug 2022 09:46:07 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Li Zhijian <lizhijian@...itsu.com>, Jason Gunthorpe <jgg@...pe.ca>,
        Leon Romanovsky <leon@...nel.org>, linux-rdma@...r.kernel.org,
        target-devel@...r.kernel.org
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] RDMA/ib_srpt: unify checking rdma_cm_id condition in
 srpt_cm_req_recv()

On 7/31/22 23:43, Li Zhijian wrote:
> Although rdma_cm_id and ib_cm_id passing to srpt_cm_req_recv() are
> exclusive currently, all other checking condition are using rdma_cm_id.
> So unify the 'if' condition to make the code more clear.
> 
> Signed-off-by: Li Zhijian <lizhijian@...itsu.com>
> ---
>   drivers/infiniband/ulp/srpt/ib_srpt.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index c3036aeac89e..21cbe30d526f 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -2218,13 +2218,13 @@ static int srpt_cm_req_recv(struct srpt_device *const sdev,
>   	ch->zw_cqe.done = srpt_zerolength_write_done;
>   	INIT_WORK(&ch->release_work, srpt_release_channel_work);
>   	ch->sport = sport;
> -	if (ib_cm_id) {
> -		ch->ib_cm.cm_id = ib_cm_id;
> -		ib_cm_id->context = ch;
> -	} else {
> +	if (rdma_cm_id) {
>   		ch->using_rdma_cm = true;
>   		ch->rdma_cm.cm_id = rdma_cm_id;
>   		rdma_cm_id->context = ch;
> +	} else {
> +		ch->ib_cm.cm_id = ib_cm_id;
> +		ib_cm_id->context = ch;
>   	}
>   	/*
>   	 * ch->rq_size should be at least as large as the initiator queue

Although the above patch looks fine to me, I'm not sure this kind of 
changes should be considered as useful or as churn?

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ