From: Dan Carpenter Date: Fri, 2 Apr 2021 11:45:44 +0000 (+0300) Subject: netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect() X-Git-Tag: accepted/tizen/unified/20230118.172025~7335^2~226^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dadf33c9f6b5f694e842d224a4d071f59ac665ee;p=platform%2Fkernel%2Flinux-rpi.git netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect() 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 Reviewed-by: Paul Moore Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 005f1c6..edb51c9 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -7978,7 +7978,7 @@ static void nf_tables_commit_audit_collect(struct list_head *adl, 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++;