summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2020-01-24 09:10:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-24 08:34:53 +0100
commitf3c539fbfa566b04f75ef728c1b1af3eb880c7dd (patch)
treef40c522fcf310835e6cdae27a789067c934b86d9
parent47f44085e01f7f68450d7a1a46369a6252505223 (diff)
downloadlinux-stable-f3c539fbfa566b04f75ef728c1b1af3eb880c7dd.tar.gz
linux-stable-f3c539fbfa566b04f75ef728c1b1af3eb880c7dd.tar.bz2
linux-stable-f3c539fbfa566b04f75ef728c1b1af3eb880c7dd.zip
help_next should increase position index
[ 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>
-rw-r--r--fs/orangefs/orangefs-debugfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c
index 0732cb08173e..e24738c691f6 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;