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  PHC 
Open Source and information security mailing list archives
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sun, 20 Mar 2022 01:44:29 +0100
From:   Florian Westphal <>
To:     Jakob Koschel <>
Cc:     Pablo Neira Ayuso <>,,,,,
        Jozsef Kadlecsik <>,
        Florian Westphal <>,
        "David S. Miller" <>,
        Jakub Kicinski <>,
        Paolo Abeni <>,
        Mike Rapoport <>,
        Brian Johannesmeyer <>,
        Cristiano Giuffrida <>,
        "Bos, H.J." <>
Subject: Re: [PATCH] netfilter: nf_tables: replace unnecessary use of

Jakob Koschel <> wrote:
> Since there is no way for the previous list_for_each_entry() to exit
> early, this call to list_for_each_entry_continue() is always guaranteed
> to start with the first element of the list and can therefore be
> replaced with a call to list_for_each_entry().
> In preparation to limit the scope of the list iterator to the list
> traversal loop, the list iterator variable 'rule' should not be used
> past the loop.
> Signed-off-by: Jakob Koschel <>
> -	list_for_each_entry_continue(rule, &chain->rules, list) {
> +	list_for_each_entry(rule, &chain->rules, list) {
>  		if (!nft_is_active_next(net, rule))
>  			continue;

You could also replace the first entry_continue and get rid of the
	rule = list_entry().

Powered by blists - more mailing lists