From: Florian Westphal <fw@strlen.de>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Al Viro <viro@zeniv.linux.org.uk>, Joe Perches <joe@perches.com>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org
Subject: Re: [RFA][PATCH 2/8] netfilter: Remove return values for print_conntrack callbacks
Date: Wed, 29 Oct 2014 23:16:01 +0100 [thread overview]
Message-ID: <20141029221601.GB10069@breakpoint.cc> (raw)
In-Reply-To: <20141029220107.465008329@goodmis.org>
Steven Rostedt <rostedt@goodmis.org> wrote:
> From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
>
> [ REQUEST FOR ACKS ]
>
> The seq_printf() and friends are having their return values removed.
> The print_conntrack() returns the result of seq_printf(), which is
> meaningless when seq_printf() returns void. Might as well remove the
> return values of print_conntrack() as well.
[..]
> diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
> index 4c48e434bb1f..91f207c2cb69 100644
> --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
> +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
> @@ -147,7 +147,10 @@ static int ct_seq_show(struct seq_file *s, void *v)
> ? (long)(ct->timeout.expires - jiffies)/HZ : 0) != 0)
> goto release;
>
> - if (l4proto->print_conntrack && l4proto->print_conntrack(s, ct))
> + if (l4proto->print_conntrack)
> + l4proto->print_conntrack(s, ct);
> +
> + if (seq_has_overflowed(s))
> goto release;
Its not obvious to me why nf_conntrack_l3proto_ipv4_compat now calls
seq_has_overflowed ...
> > diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
> index cf65a1e040dd..348aa3602787 100644
> --- a/net/netfilter/nf_conntrack_standalone.c
> +++ b/net/netfilter/nf_conntrack_standalone.c
> @@ -199,8 +199,8 @@ static int ct_seq_show(struct seq_file *s, void *v)
> ? (long)(ct->timeout.expires - jiffies)/HZ : 0) != 0)
> goto release;
>
> - if (l4proto->print_conntrack && l4proto->print_conntrack(s, ct))
> - goto release;
> + if (l4proto->print_conntrack)
> + l4proto->print_conntrack(s, ct);
>
> if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
> l3proto, l4proto))
... while nf_conntrack_standalone does not.
next prev parent reply other threads:[~2014-10-29 22:16 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20141029215602.535533597@goodmis.org>
2014-10-29 21:56 ` [RFA][PATCH 2/8] netfilter: Remove return values for print_conntrack callbacks Steven Rostedt
2014-10-29 22:16 ` Florian Westphal [this message]
2014-10-29 23:53 ` Steven Rostedt
2014-10-30 1:06 ` Steven Rostedt
2014-11-04 13:05 ` Steven Rostedt
2014-11-04 14:11 ` Steven Rostedt
2014-11-04 14:22 ` Pablo Neira Ayuso
2014-11-04 14:31 ` Steven Rostedt
2014-11-04 14:46 ` Joe Perches
2014-11-04 14:52 ` Steven Rostedt
2014-11-04 14:46 ` Pablo Neira Ayuso
2014-11-04 14:48 ` Steven Rostedt
2014-11-04 19:59 ` Steven Rostedt
2014-10-29 21:56 ` [RFA][PATCH 3/8] netfilter: Convert print_tuple functions to return void Steven Rostedt
2014-11-04 13:07 ` Steven Rostedt
2014-11-04 14:50 ` Steven Rostedt
2014-10-29 21:56 ` [RFA][PATCH 4/8] netfilter: Remove checks of seq_printf() return values Steven Rostedt
2014-11-04 13:08 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141029221601.GB10069@breakpoint.cc \
--to=fw@strlen.de \
--cc=akpm@linux-foundation.org \
--cc=coreteam@netfilter.org \
--cc=joe@perches.com \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=rostedt@goodmis.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).