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: <4f3bc406-1671-4f37-98e4-38e00590f487@gmail.com>
Date: Fri, 16 Feb 2024 15:30:57 +0000
From: Dmitry Safonov <0x7f454c46@...il.com>
To: Colin Ian King <colin.i.king@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>, David Ahern
 <dsahern@...nel.org>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
 kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org,
 Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH][next] net: tcp: Remove redundant initialization of
 variable len

On 2/16/24 13:00, Eric Dumazet wrote:
> On Fri, Feb 16, 2024 at 1:54 PM Colin Ian King <colin.i.king@...il.com> wrote:
>>
>> The variable len being initialized with a value that is never read, an
>> if statement is initializing it in both paths of the if statement.
>> The initialization is redundant and can be removed.
>>
>> Cleans up clang scan build warning:
>> net/ipv4/tcp_ao.c:512:11: warning: Value stored to 'len' during its
>> initialization is never read [deadcode.DeadStores]
>>
>> Signed-off-by: Colin Ian King <colin.i.king@...il.com>

LGTM,

Reviewed-by: Dmitry Safonov <0x7f454c46@...il.com>

>> ---
>>  net/ipv4/tcp_ao.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/ipv4/tcp_ao.c b/net/ipv4/tcp_ao.c
>> index 87db432c6bb4..3afeeb68e8a7 100644
>> --- a/net/ipv4/tcp_ao.c
>> +++ b/net/ipv4/tcp_ao.c
>> @@ -509,9 +509,9 @@ static int tcp_ao_hash_header(struct tcp_sigpool *hp,
>>                               bool exclude_options, u8 *hash,
>>                               int hash_offset, int hash_len)
>>  {
>> -       int err, len = th->doff << 2;
>>         struct scatterlist sg;
>>         u8 *hdr = hp->scratch;
>> +       int err, len;
>>
>>         /* We are not allowed to change tcphdr, make a local copy */
>>         if (exclude_options) {
>> --
>> 2.39.2
>>
> 
> Cc Dmitry Safonov
> 
> Dmitry, can you take a look ?

Thanks for Cc'ing!

> 
> Thanks !

Thanks,
             Dmitry


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ