netfilter: nf_tables: avoid BUG_ON usage
authorFlorian Westphal <fw@strlen.de>
Tue, 4 Sep 2018 14:01:47 +0000 (16:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:46:50 +0000 (18:46 +0100)
commite97d09277b7730f85427969115c4ea358bcc2703
tree34bfb191fb08d2f251e9f392d45bdc0939e50bb4
parentd1440f1a38ebbcb9db1b676edc0c7f1c9f42fbd7
netfilter: nf_tables: avoid BUG_ON usage

[ Upstream commit fa5950e498e7face21a1761f327e6c1152f778c3 ]

None of these spots really needs to crash the kernel.
In one two cases we can jsut report error to userspace, in the other
cases we can just use WARN_ON (and leak memory instead).

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_tables_api.c
net/netfilter/nft_cmp.c
net/netfilter/nft_reject.c