lkml.org 
[lkml]   [2020]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 163/237] help_next should increase position index
    Date
    From: Vasily Averin <vvs@virtuozzo.com>

    [ Upstream commit 9f198a2ac543eaaf47be275531ad5cbd50db3edf ]

    if seq_file .next fuction does not change position index,
    read after some lseek can generate unexpected output.

    https://bugzilla.kernel.org/show_bug.cgi?id=206283
    Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
    Signed-off-by: Mike Marshall <hubcap@omnibond.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    fs/orangefs/orangefs-debugfs.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
    index 1c59dff530dee..34d1cc98260d2 100644
    --- a/fs/orangefs/orangefs-debugfs.c
    +++ b/fs/orangefs/orangefs-debugfs.c
    @@ -305,6 +305,7 @@ static void *help_start(struct seq_file *m, loff_t *pos)

    static void *help_next(struct seq_file *m, void *v, loff_t *pos)
    {
    + (*pos)++;
    gossip_debug(GOSSIP_DEBUGFS_DEBUG, "help_next: start\n");

    return NULL;
    --
    2.20.1


    \
     
     \ /
      Last update: 2020-02-27 15:37    [W:3.099 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site