]> git.baikalelectronics.ru Git - kernel.git/commit
proc: fix /proc/loadavg regression
authorAlexey Dobriyan <adobriyan@gmail.com>
Fri, 20 Apr 2018 21:56:06 +0000 (14:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 21 Apr 2018 00:18:36 +0000 (17:18 -0700)
commit0679d7091620542d4b97ddd87779ec53fd448ff9
tree76440cbf3440f63c66de2762b053ad0f399cb9cd
parent04f63c234324e852322240a24fa7473b377b78c4
proc: fix /proc/loadavg regression

Commit e6f735160050 ("pid: replace pid bitmap implementation with IDR
API") changed last field of /proc/loadavg (last pid allocated) to be off
by one:

# unshare -p -f --mount-proc cat /proc/loadavg
0.00 0.00 0.00 1/60 2 <===

It should be 1 after first fork into pid namespace.

This is formally a regression but given how useless this field is I
don't think anyone is affected.

Bug was found by /proc testsuite!

Link: http://lkml.kernel.org/r/20180413175408.GA27246@avx2
Fixes: e6f735160050b6d ("pid: replace pid bitmap implementation with IDR API")
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Gargi Sharma <gs051095@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/powerpc/platforms/cell/spufs/sched.c
fs/proc/loadavg.c