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]
Message-ID: <4eb1bcc28e00aeedfe767d3b6afcb864bcdb03b4.camel@redhat.com>
Date:   Tue, 22 Mar 2022 10:32:52 +0100
From:   Paolo Abeni <pabeni@...hat.com>
To:     Xiaomeng Tong <xiam0nd.tong@...il.com>, christopher.lee@...i.com
Cc:     davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, jakobkoschel@...il.com
Subject: Re: [PATCH v2] myri10ge: remove an unneeded NULL check

Hello,

On Sun, 2022-03-20 at 12:44 +0800, Xiaomeng Tong wrote:
> The define of skb_list_walk_safe(first, skb, next_skb) is:
>   for ((skb) = (first), (next_skb) = (skb) ? (skb)->next : NULL; (skb);  \
>      (skb) = (next_skb), (next_skb) = (skb) ? (skb)->next : NULL)
> 
> Thus, if the 'segs' passed as 'first' into the skb_list_walk_safe is NULL,
> the loop will exit immediately. In other words, it can be sure the 'segs'
> is non-NULL when we run inside the loop. So just remove the unnecessary
> NULL check. Also remove the unneeded assignmnets.
> 
> Signed-off-by: Xiaomeng Tong <xiam0nd.tong@...il.com>

This is pure net-next material, and we are now into the merge window -
only fixes allowed. Please repost in 2w, thanks!

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ