aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ftrace.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index dc810208edde..71a52c172140 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1417,10 +1417,20 @@ static void *t_hash_start(struct seq_file *m, loff_t *pos)
1417{ 1417{
1418 struct ftrace_iterator *iter = m->private; 1418 struct ftrace_iterator *iter = m->private;
1419 void *p = NULL; 1419 void *p = NULL;
1420 loff_t l;
1421
1422 if (!(iter->flags & FTRACE_ITER_HASH))
1423 *pos = 0;
1420 1424
1421 iter->flags |= FTRACE_ITER_HASH; 1425 iter->flags |= FTRACE_ITER_HASH;
1422 1426
1423 return t_hash_next(m, p, pos); 1427 iter->hidx = 0;
1428 for (l = 0; l <= *pos; ) {
1429 p = t_hash_next(m, p, &l);
1430 if (!p)
1431 break;
1432 }
1433 return p;
1424} 1434}
1425 1435
1426static int t_hash_show(struct seq_file *m, void *v) 1436static int t_hash_show(struct seq_file *m, void *v)