[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKXUXMzdGdyQg9CXJ2AZStrBk3J10r5r=gyiAuU4WimnoQNyvA@mail.gmail.com>
Date: Mon, 23 Aug 2021 19:01:14 +0200
From: Lukas Bulwahn <lukas.bulwahn@...il.com>
To: Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
Florian Westphal <fw@...len.de>,
netfilter-devel@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Netdev <netdev@...r.kernel.org>, coreteam@...filter.org,
clang-built-linux <clang-built-linux@...glegroups.com>
Subject: Suspicious pattern for use of function xt_register_template()
Dear Florian, dear netfilter maintainers,
Commit fdacd57c79b ("netfilter: x_tables: never register tables by
default") on linux-next
introduces the function xt_register_template() and in all cases but
one, the calls to that function are followed by:
if (ret < 0)
return ret;
All these checks were also added with the commit above.
In the one case, for iptable_mangle_init() in
./net/ipv4/netfilter/iptable_mangle.c, this pattern was not followed.
This makes this ret assignment in this function a Dead Store and
hence, clang-analyzer warns about that.
Are we missing here an early return for a negative return value as
well, or is this case for iptable_mangle_init() in
./net/ipv4/netfilter/iptable_mangle.c special?
Best regards,
Lukas
Powered by blists - more mailing lists