This is a note to let you know that I've just added the patch titled proc: add a schedule point in proc_pid_readdir() to the 4.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: proc-add-a-schedule-point-in-proc_pid_readdir.patch and it can be found in the queue-4.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Thu Jun 15 16:23:30 CEST 2017 From: Eric Dumazet <edumazet@xxxxxxxxxx> Date: Tue, 24 Jan 2017 15:18:07 -0800 Subject: proc: add a schedule point in proc_pid_readdir() From: Eric Dumazet <edumazet@xxxxxxxxxx> [ Upstream commit 3ba4bceef23206349d4130ddf140819b365de7c8 ] We have seen proc_pid_readdir() invocations holding cpu for more than 50 ms. Add a cond_resched() to be gentle with other tasks. [akpm@xxxxxxxxxxxxxxxxxxxx: coding style fix] Link: http://lkml.kernel.org/r/1484238380.15816.42.camel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/proc/base.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -3181,6 +3181,8 @@ int proc_pid_readdir(struct file *file, iter.tgid += 1, iter = next_tgid(ns, iter)) { char name[PROC_NUMBUF]; int len; + + cond_resched(); if (!has_pid_permissions(ns, iter.task, 2)) continue; Patches currently in stable-queue which might be from edumazet@xxxxxxxxxx are queue-4.9/proc-add-a-schedule-point-in-proc_pid_readdir.patch queue-4.9/tcp-tcp_probe-use-spin_lock_bh.patch queue-4.9/net-fix-ndo_features_check-ndo_fix_features-comment-ordering.patch queue-4.9/ipv6-fix-flow-labels-when-the-traffic-class-is-non-0.patch