* [PATCH] netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect()
@ 2021-04-02 11:45 Dan Carpenter
2021-04-02 15:57 ` Paul Moore
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2021-04-02 11:45 UTC (permalink / raw)
To: Pablo Neira Ayuso, Richard Guy Briggs
Cc: Jozsef Kadlecsik, Florian Westphal, Paul Moore, netfilter-devel,
coreteam, kernel-janitors
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: bb4052e57b5b ("audit: log nftables configuration change events once per table")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
net/netfilter/nf_tables_api.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 42bf3e15065a..2fb2ccf87011 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -8022,7 +8022,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++;
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect()
2021-04-02 11:45 [PATCH] netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect() Dan Carpenter
@ 2021-04-02 15:57 ` Paul Moore
2021-04-03 18:18 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Paul Moore @ 2021-04-02 15:57 UTC (permalink / raw)
To: Dan Carpenter
Cc: Pablo Neira Ayuso, Richard Guy Briggs, Jozsef Kadlecsik,
Florian Westphal, netfilter-devel, coreteam, kernel-janitors
On Fri, Apr 2, 2021 at 7:46 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 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: bb4052e57b5b ("audit: log nftables configuration change events once per table")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> net/netfilter/nf_tables_api.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks Dan.
Reviewed-by: Paul Moore <paul@paul-moore.com>
> diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
> index 42bf3e15065a..2fb2ccf87011 100644
> --- a/net/netfilter/nf_tables_api.c
> +++ b/net/netfilter/nf_tables_api.c
> @@ -8022,7 +8022,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++;
> --
> 2.30.2
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect()
2021-04-02 15:57 ` Paul Moore
@ 2021-04-03 18:18 ` Pablo Neira Ayuso
2021-04-15 20:23 ` Richard Guy Briggs
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2021-04-03 18:18 UTC (permalink / raw)
To: Paul Moore
Cc: Dan Carpenter, Richard Guy Briggs, Jozsef Kadlecsik,
Florian Westphal, netfilter-devel, coreteam, kernel-janitors
On Fri, Apr 02, 2021 at 11:57:20AM -0400, Paul Moore wrote:
> On Fri, Apr 2, 2021 at 7:46 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > 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: bb4052e57b5b ("audit: log nftables configuration change events once per table")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > net/netfilter/nf_tables_api.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Thanks Dan.
>
> Reviewed-by: Paul Moore <paul@paul-moore.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect()
2021-04-03 18:18 ` Pablo Neira Ayuso
@ 2021-04-15 20:23 ` Richard Guy Briggs
0 siblings, 0 replies; 4+ messages in thread
From: Richard Guy Briggs @ 2021-04-15 20:23 UTC (permalink / raw)
To: Pablo Neira Ayuso
Cc: Paul Moore, Dan Carpenter, Jozsef Kadlecsik, Florian Westphal,
netfilter-devel, coreteam, kernel-janitors
On 2021-04-03 20:18, Pablo Neira Ayuso wrote:
> On Fri, Apr 02, 2021 at 11:57:20AM -0400, Paul Moore wrote:
> > On Fri, Apr 2, 2021 at 7:46 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> > > 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: bb4052e57b5b ("audit: log nftables configuration change events once per table")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > > ---
> > > net/netfilter/nf_tables_api.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Thanks Dan.
> >
> > Reviewed-by: Paul Moore <paul@paul-moore.com>
>
> Applied, thanks.
Thanks Dan, Paul, Pablo.
- RGB
--
Richard Guy Briggs <rgb@redhat.com>
Sr. S/W Engineer, Kernel Security, Base Operating Systems
Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-04-15 20:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-02 11:45 [PATCH] netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect() Dan Carpenter
2021-04-02 15:57 ` Paul Moore
2021-04-03 18:18 ` Pablo Neira Ayuso
2021-04-15 20:23 ` Richard Guy Briggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).