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:   Thu, 11 Mar 2021 11:59:48 +0100
From:   Eric Dumazet <edumazet@...gle.com>
To:     Shubhankar Kuranagatti <shubhankarvk@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Willem de Bruijn <willemb@...gle.com>,
        netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>, mchehab+huawei@...nel.org
Subject: Re: [PATCH 1/2] net: core: datagram.c: Fix use of assignment in if condition

On Thu, Mar 11, 2021 at 11:34 AM Shubhankar Kuranagatti
<shubhankarvk@...il.com> wrote:
>
> The assignment inside the if condition has been changed to
> initialising outside the if condition.
>
> Signed-off-by: Shubhankar Kuranagatti <shubhankarvk@...il.com>
> ---
>  net/core/datagram.c | 31 ++++++++++++++++++++-----------
>  1 file changed, 20 insertions(+), 11 deletions(-)
>
> diff --git a/net/core/datagram.c b/net/core/datagram.c
> index 15ab9ffb27fe..7b2204f102b7 100644
> --- a/net/core/datagram.c
> +++ b/net/core/datagram.c
> @@ -427,7 +427,8 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
>                 offset += n;
>                 if (n != copy)
>                         goto short_copy;
> -               if ((len -= copy) == 0)
> +               len -= copy
> +               if ((len) == 0)
>                         return 0;
>


Quite frankly I prefer the current style.

It also seems you have not even compiled your change, this is not a good start.

Lets keep reviewer time to review patches that really bring an improvement,
since stylistic changes like that make our backports more likely to
have conflicts.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ