lkml.org 
[lkml]   [2020]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.5 079/151] netfilter: nf_conntrack: ct_cpu_seq_next should increase position index
    Date
    From: Vasily Averin <vvs@virtuozzo.com>

    commit dc15af8e9dbd039ebb06336597d2c491ef46ab74 upstream.

    If .next function does not change position index,
    following .show function will repeat output related
    to current position index.

    Cc: stable@vger.kernel.org
    Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283
    Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    net/netfilter/nf_conntrack_standalone.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/net/netfilter/nf_conntrack_standalone.c
    +++ b/net/netfilter/nf_conntrack_standalone.c
    @@ -411,7 +411,7 @@ static void *ct_cpu_seq_next(struct seq_
    *pos = cpu + 1;
    return per_cpu_ptr(net->ct.stat, cpu);
    }
    -
    + (*pos)++;
    return NULL;
    }


    \
     
     \ /
      Last update: 2020-03-17 12:11    [W:2.824 / U:0.732 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site