[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1412082296.4302.101.camel@joe-AO725>
Date: Tue, 30 Sep 2014 06:04:56 -0700
From: Joe Perches <joe@...ches.com>
To: Petr Mladek <pmladek@...e.cz>
Cc: Steven Rostedt <rostedt@...dmis.org>,
Al Viro <viro@...IV.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Pablo Neira Ayuso <pablo@...filter.org>,
Patrick McHardy <kaber@...sh.net>,
Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
"David S. Miller" <davem@...emloft.net>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] netfilter: Convert print_tuple functions to return
void
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists