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: <Y33XwExuTXehapvV@gondor.apana.org.au>
Date:   Wed, 23 Nov 2022 16:20:16 +0800
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Cc:     tgraf@...g.ch, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Abaci Robot <abaci@...ux.alibaba.com>
Subject: Re: [PATCH] lib/test_rhashtable: Remove set but unused variable
 'insert_retries'

On Wed, Nov 23, 2022 at 11:59:51AM +0800, Jiapeng Chong wrote:
>
> @@ -447,9 +447,7 @@ static int __init test_rhashtable_max(struct test_obj *array,
>  
>  		obj->value.id = i * 2;
>  		err = insert_retry(&ht, obj, test_rht_params);
> -		if (err > 0)
> -			insert_retries += err;
> -		else if (err)
> +		if (err)

This is wrong as you will now abort on a retried insertion.  You
should instead test for err < 0.

Thanks,
-- 
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ