Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1302597

[PATCH 3.16.y-ckt 085/126] netfilter: nf_tables: fix bogus warning in nft_data_uninit()

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Luis Henriques <luis.henriques@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 3.16.y-ckt 085/126] netfilter: nf_tables: fix bogus warning in nft_data_uninit()
Date Wed, 06 Jan 2016 12:00:02 +0100
Message-ID <qNTYS-8si-7@gated-at.bofh.it> (permalink)
References <qNTFw-8jf-7@gated-at.bofh.it>
X-Original-To linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com
X-Extended-Stable 3.16
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 45
Organization linux.* mail to news gateway
X-Original-Cc Mirek Kratochvil <exa.exa@gmail.com>, Pablo Neira Ayuso <pablo@netfilter.org>, Luis Henriques <luis.henriques@canonical.com>
X-Original-Date Wed, 6 Jan 2016 10:36:54 +0000
X-Original-Message-ID <1452076655-12851-86-git-send-email-luis.henriques@canonical.com>
X-Original-References <1452076655-12851-1-git-send-email-luis.henriques@canonical.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1302597

Show key headers only | View raw


3.16.7-ckt22 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Mirek Kratochvil <exa.exa@gmail.com>

commit 960bd2c26421d321e890f1936938196ead41976f upstream.

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

Fixes: https://bugzilla.netfilter.org/show_bug.cgi?id=1013
Signed-off-by: Mirek Kratochvil <exa.exa@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 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 7b049cb56825..3ea4109486ce 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -3956,9 +3956,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:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 3.16.y-ckt 085/126] netfilter: nf_tables: fix bogus warning in nft_data_uninit() Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:00 +0100

csiph-web