From: Joe Perches <joe@perches.com>
To: Petr Mladek <pmladek@suse.cz>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Al Viro <viro@ZenIV.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Pablo Neira Ayuso <pablo@netfilter.org>,
Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/7] netfilter: Convert print_tuple functions to return void
Date: Tue, 30 Sep 2014 06:04:56 -0700 [thread overview]
Message-ID: <1412082296.4302.101.camel@joe-AO725> (raw)
In-Reply-To: <20140930102221.GB2707@dhcp128.suse.cz>
On Tue, 2014-09-30 at 12:22 +0200, Petr Mladek wrote:
> On Mon 29-09-14 16:08:22, Joe Perches wrote:
> > Since adding a new function to seq_file (seq_is_full)
> > there isn't any value for functions called from seq_show to
> > return anything. Remove the int returns of the various
> > print_tuple/<foo>_print_tuple functions.
[a bunch of quoted stuff]
Please remember to cut out from your replies the unnecessary old stuff.
It can take quite awhile to scan through looking for your comments.
> > diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
[]
> > @@ -202,9 +203,8 @@ static int ct_seq_show(struct seq_file *s, void *v)
> > if (l4proto->print_conntrack && l4proto->print_conntrack(s, ct))
> > goto release;
> >
> > - if (print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
> > - l3proto, l4proto))
> > - goto release;
> > + print_tuple(s, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
> > + l3proto, l4proto);
>
> To be precise, we should add:
>
> if (seq_overflow(s))
> goto release;
Precision isn't all that useful when checking seq_<output>.
There really isn't much value in checking each possible
overflow site. A periodic check prior to or in the middle
of a more costly/longish operation should be acceptable.
The entire block that precedes any seq buffer full test will
be redone when the buffer is expanded.
next prev parent reply other threads:[~2014-09-30 13:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140929124246.3e39dac8@gandalf.local.home>
2014-09-29 23:08 ` [PATCH 0/7] seq_printf cleanups Joe Perches
2014-09-29 23:08 ` [PATCH 2/7] netfilter: Convert print_tuple functions to return void Joe Perches
2014-09-30 10:22 ` Petr Mladek
2014-09-30 13:04 ` Joe Perches [this message]
2014-09-29 23:08 ` [PATCH 5/7] fs: Convert show_fdinfo functions to void Joe Perches
2014-10-28 14:11 ` Steven Rostedt
2014-10-28 14:31 ` Joe Perches
2014-10-28 14:43 ` Steven Rostedt
2014-10-28 15:32 ` [PATCH 0/7] seq_printf cleanups Steven Rostedt
2014-10-28 15:51 ` Joe Perches
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=1412082296.4302.101.camel@joe-AO725 \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=pmladek@suse.cz \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.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).