提交 dadf33c9 编写于 作者: D Dan Carpenter 提交者: Pablo Neira Ayuso

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: c520292f ("audit: log nftables configuration change events once per table")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NPaul Moore <paul@paul-moore.com>
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 daf47a7c
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册