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] [day] [month] [year] [list]
Date:   Mon, 1 Aug 2022 10:41:59 +0800
From:   Mark Zhang <markzhang@...dia.com>
To:     cgel.zte@...il.com, linux-kernel@...r.kernel.org
Cc:     linux-rdma@...r.kernel.org, ye xingchen <ye.xingchen@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] IB/cm:Change the conditional statements

On 8/1/2022 10:31 AM, cgel.zte@...il.com wrote:
> External email: Use caution opening links or attachments
> 
> 
> From: ye xingchen <ye.xingchen@....com.cn>
> 
> Conditional statements could changed to be easier explain.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
> ---
>   drivers/infiniband/core/cm.c | 9 ++-------
>   1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
> index b985e0d9bc05..6e323d0c0fce 100644
> --- a/drivers/infiniband/core/cm.c
> +++ b/drivers/infiniband/core/cm.c
> @@ -676,14 +676,9 @@ static struct cm_id_private *cm_find_listen(struct ib_device *device,
>                          refcount_inc(&cm_id_priv->refcount);
>                          return cm_id_priv;
>                  }
> -               if (device < cm_id_priv->id.device)
> +               if (device < cm_id_priv->id.device ||
> +                   be64_lt(service_id, cm_id_priv->id.service_id))
>                          node = node->rb_left;
> -               else if (device > cm_id_priv->id.device)
> -                       node = node->rb_right;
> -               else if (be64_lt(service_id, cm_id_priv->id.service_id))
> -                       node = node->rb_left;
> -               else if (be64_gt(service_id, cm_id_priv->id.service_id))
> -                       node = node->rb_right;
>                  else
>                          node = node->rb_right;
>          }
> --
> 2.25.1

This is not correct, ref.:
https://lore.kernel.org/lkml/20220624201733.GA284068@nvidia.com/t/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ