diff --git a/kmod/src/tseq.c b/kmod/src/tseq.c index b4b07f34..2621406f 100644 --- a/kmod/src/tseq.c +++ b/kmod/src/tseq.c @@ -183,6 +183,13 @@ static void *scoutfs_tseq_seq_next(struct seq_file *m, void *v, loff_t *pos) ent = tseq_rb_next(ent); if (ent) *pos = ent->pos; + else + /* + * once we hit the end, *pos is never used, but it has to + * be updated to avoid an error in bpf_seq_read() + */ + (*pos)++; + return ent; }