* [PATCH nf] nf_tables: fix bogus warning in nft_data_uninit()
@ 2015-05-15 20:05 Pablo Neira Ayuso
2015-05-15 20:08 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-05-15 20:05 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber, exa.exa
From: Pablo Neira Ayuso <pablo@netfilter.orgi>
From: Mirek Kratochvil <exa.exa@gmail.com>
The values 0x00000000-0xfffffeff are reserved for userspace datatype. When,
deleting set elements with maps, a bogus warning is triggered.
WARNING: CPU: 0 PID: 11133 at net/netfilter/nf_tables_api.c:4481 nft_data_uninit+0x35/0x40 [nf_tables]()
This fixes the check accordingly to enum definition in
include/linux/netfilter/nf_tables.h
Based on patch from Mirek.
Fixes: https://bugzilla.netfilter.org/show_bug.cgi?id=1013
Reported-by: Mirek Kratochvil <exa.exa@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
I'm sending a v2 of this patch:
http://patchwork.ozlabs.org/patch/465960/
It doesn't apply cleanly to the nf tree and I have adjusted the indentation.
If no objections, I'll apply this to the nf tree. Thanks.
net/netfilter/nf_tables_api.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index ad9d11f..34ded09 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -4472,9 +4472,9 @@ EXPORT_SYMBOL_GPL(nft_data_init);
*/
void nft_data_uninit(const struct nft_data *data, enum nft_data_types type)
{
- switch (type) {
- case NFT_DATA_VALUE:
+ if (type < NFT_DATA_VERDICT)
return;
+ switch (type) {
case NFT_DATA_VERDICT:
return nft_verdict_uninit(data);
default:
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nf] nf_tables: fix bogus warning in nft_data_uninit()
2015-05-15 20:05 [PATCH nf] nf_tables: fix bogus warning in nft_data_uninit() Pablo Neira Ayuso
@ 2015-05-15 20:08 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2015-05-15 20:08 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber, exa.exa
On Fri, May 15, 2015 at 10:05:55PM +0200, Pablo Neira Ayuso wrote:
> From: Pablo Neira Ayuso <pablo@netfilter.orgi>
>
> From: Mirek Kratochvil <exa.exa@gmail.com>
Just for the record: I'll mangle this to restore your original
authorship before applying, that was my intention.
> The values 0x00000000-0xfffffeff are reserved for userspace datatype. When,
> deleting set elements with maps, a bogus warning is triggered.
>
> WARNING: CPU: 0 PID: 11133 at net/netfilter/nf_tables_api.c:4481 nft_data_uninit+0x35/0x40 [nf_tables]()
>
> This fixes the check accordingly to enum definition in
> include/linux/netfilter/nf_tables.h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-15 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-15 20:05 [PATCH nf] nf_tables: fix bogus warning in nft_data_uninit() Pablo Neira Ayuso
2015-05-15 20:08 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).