Message ID | 1431720355-3604-1-git-send-email-pablo@netfilter.org |
---|---|
State | Accepted |
Delegated to: | Pablo Neira |
Headers | show |
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 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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: