Skip to content
  • Philippe Gerum's avatar
    cobalt/vfile: seq_file seek index must progress · 018003d3
    Philippe Gerum authored and Jan Kiszka's avatar Jan Kiszka committed
    
    
    The offset field we receive from the kernel in a vfile next() handler
    must progress in order for the loop to stop properly, independently
    from our own tracking of the end-of-list condition.
    
    Bug is reproducible by running two loops in parallel:
    
    - one continuously spawning an application which creates a few tenths
    of threads (10-20 would suffice) before exiting shortly after.
    
    - another one continuously reading from /proc/xenomai/sched/{threads,
      stat, acct}.
    
    At some point, the vfile handler should cause a kernel crash.
    
    Signed-off-by: default avatarPhilippe Gerum <rpm@xenomai.org>
    Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
    018003d3