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: <20171211120227.GN12014@gondor.apana.org.au>
Date:   Mon, 11 Dec 2017 23:02:27 +1100
From:   Herbert Xu <herbert@...dor.apana.org.au>
To:     Tom Herbert <tom@...ntonium.net>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, rohit@...ntonium.net
Subject: Re: [PATCH v2 net-next 1/5] rhashtable: Change rhashtable_walk_start
 to return void

On Mon, Dec 04, 2017 at 10:31:41AM -0800, Tom Herbert wrote:
> Most callers of rhashtable_walk_start don't care about a resize event
> which is indicated by a return value of -EAGAIN. So calls to
> rhashtable_walk_start are wrapped wih code to ignore -EAGAIN. Something
> like this is common:
> 
>        ret = rhashtable_walk_start(rhiter);
>        if (ret && ret != -EAGAIN)
>                goto out;
> 
> Since zero and -EAGAIN are the only possible return values from the
> function this check is pointless. The condition never evaluates to true.
> 
> This patch changes rhashtable_walk_start to return void. This simplifies
> code for the callers that ignore -EAGAIN. For the few cases where the
> caller cares about the resize event, particularly where the table can be
> walked in mulitple parts for netlink or seq file dump, the function
> rhashtable_walk_start_check has been added that returns -EAGAIN on a
> resize event.
> 
> Signed-off-by: Tom Herbert <tom@...ntonium.net>

Acked-by: Herbert Xu <herbert@...dor.apana.org.au>
-- 
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