| From a004eb351f2fe1c1c2c596cf82bbc574cd393aa5 Mon Sep 17 00:00:00 2001 |
| From: Vasily Averin <vvs@virtuozzo.com> |
| Date: Fri, 24 Jan 2020 09:10:47 +0300 |
| Subject: [PATCH] help_next should increase position index |
| |
| commit 9f198a2ac543eaaf47be275531ad5cbd50db3edf upstream. |
| |
| 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: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/fs/orangefs/orangefs-debugfs.c b/fs/orangefs/orangefs-debugfs.c |
| index 87b1a6fce628..610e1dc112ea 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.7.4 |
| |