[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220823080051.904861510@linuxfoundation.org>
Date: Tue, 23 Aug 2022 10:28:03 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dan Carpenter <dan.carpenter@...cle.com>,
Paul Moore <paul@...l-moore.com>,
Pablo Neira Ayuso <pablo@...filter.org>
Subject: [PATCH 5.10 151/158] netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect()
From: Dan Carpenter <dan.carpenter@...cle.com>
commit dadf33c9f6b5f694e842d224a4d071f59ac665ee upstream.
The first argument of a WARN_ONCE() is a condition. This WARN_ONCE()
will only print the table name, and is potentially problematic if the
table name has a %s in it.
Fixes: c520292f29b8 ("audit: log nftables configuration change events once per table")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Reviewed-by: Paul Moore <paul@...l-moore.com>
Signed-off-by: Pablo Neira Ayuso <pablo@...filter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
net/netfilter/nf_tables_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -7828,7 +7828,7 @@ static void nf_tables_commit_audit_colle
if (adp->table == table)
goto found;
}
- WARN_ONCE("table=%s not expected in commit list", table->name);
+ WARN_ONCE(1, "table=%s not expected in commit list", table->name);
return;
found:
adp->entries++;
Powered by blists - more mailing lists