[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4e49830d-4c88-0171-ee24-1ee540028dad@virtuozzo.com>
Date: Tue, 25 Feb 2020 11:11:20 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: linux-kernel@...r.kernel.org
Cc: Kees Cook <keescook@...omium.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>
Subject: [PATCH v2] pstore: pstore_ftrace_seq_next should increase position
index
If .next function does not change position index,
following .show function will repeat output related
to current position index.
Cc: stable@...r.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@...tuozzo.com>
---
fs/pstore/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index 7fbe8f0..ea8799b 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -87,11 +87,11 @@ static void *pstore_ftrace_seq_next(struct seq_file *s, void *v, loff_t *pos)
struct pstore_private *ps = s->private;
struct pstore_ftrace_seq_data *data = v;
+ (*pos)++;
data->off += REC_SIZE;
if (data->off + REC_SIZE > ps->total_size)
return NULL;
- (*pos)++;
return data;
}
--
1.8.3.1
Powered by blists - more mailing lists