lkml.org 
[lkml]   [2015]   [Apr]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/5 v2] netfilter: Fix format string of nfnetlink_log proc file
On Thu, 09 Apr 2015 15:39:37 -0700
Joe Perches <joe@perches.com> wrote:

> And Steven,
>
> commit e71456ae9871
> ("netfilter: Remove checks of seq_printf() return values")
> mistakenly converted this to use seq_has_overflowed()
>
> Ideally all seq_show functions would be converted from
>
> int foo_seq_show(...)
> {
> seq_printf(s, ...);
> return seq_has_overflowed(s);
> }
>
> to
>
> int foo_seq_show(...)
> {
> seq_printf(s, ...);
> return 0;
> }
>
> I made that mistake in a patch and corrected it later.
>
> Here's a suggested -next patch:
>
> Perhaps it shouldn't be submitted now as it may conflict
> with what Richard might submit if he propses an equivalent
> patch to above for -next.
>
> There is an appropriate use of return seq_has_overflowed in:
>
> net/netfilter/xt_hashlimit.c:825: return seq_has_overflowed(s);
>
> That's not a seq_show function, it's a helper for one.

I have other things to work on, so feel free to fix it up among
yourselves.

-- Steve



\
 
 \ /
  Last update: 2015-04-10 01:21    [W:0.093 / U:3.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site