The patch titled Subject: proc: fix /proc/loadavg regression has been added to the -mm tree. Its filename is proc-fix-proc-loadavg-regression.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/proc-fix-proc-loadavg-regression.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/proc-fix-proc-loadavg-regression.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Alexey Dobriyan <adobriyan@xxxxxxxxx> Subject: proc: fix /proc/loadavg regression 95846ecf9dac508 ("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: 95846ecf9dac508 ("pid: replace pid bitmap implementation with IDR API") Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx> Cc: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx> Cc: Gargi Sharma <gs051095@xxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- arch/powerpc/platforms/cell/spufs/sched.c | 2 +- fs/proc/loadavg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff -puN arch/powerpc/platforms/cell/spufs/sched.c~proc-fix-proc-loadavg-regression arch/powerpc/platforms/cell/spufs/sched.c --- a/arch/powerpc/platforms/cell/spufs/sched.c~proc-fix-proc-loadavg-regression +++ a/arch/powerpc/platforms/cell/spufs/sched.c @@ -1093,7 +1093,7 @@ static int show_spu_loadavg(struct seq_f LOAD_INT(c), LOAD_FRAC(c), count_active_contexts(), atomic_read(&nr_spu_contexts), - idr_get_cursor(&task_active_pid_ns(current)->idr)); + idr_get_cursor(&task_active_pid_ns(current)->idr) - 1); return 0; } diff -puN fs/proc/loadavg.c~proc-fix-proc-loadavg-regression fs/proc/loadavg.c --- a/fs/proc/loadavg.c~proc-fix-proc-loadavg-regression +++ a/fs/proc/loadavg.c @@ -24,7 +24,7 @@ static int loadavg_proc_show(struct seq_ LOAD_INT(avnrun[1]), LOAD_FRAC(avnrun[1]), LOAD_INT(avnrun[2]), LOAD_FRAC(avnrun[2]), nr_running(), nr_threads, - idr_get_cursor(&task_active_pid_ns(current)->idr)); + idr_get_cursor(&task_active_pid_ns(current)->idr) - 1); return 0; } _ Patches currently in -mm which might be from adobriyan@xxxxxxxxx are proc-revalidate-misc-dentries.patch proc-revalidate-kernel-thread-inodes-to-root-root.patch proc-fix-proc-loadavg-regression.patch coredump-fix-spam-with-zero-vma-process.patch seq_file-delete-small-value-optimization.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html