* Patch "proc: add a schedule point in proc_pid_readdir()" has been added to the 4.4-stable tree
@ 2017-06-15 14:39 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-15 14:39 UTC (permalink / raw)
To: edumazet, akpm, alexander.levin, gregkh, torvalds; +Cc: stable, stable-commits
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.4-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.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Thu Jun 15 16:23:46 CEST 2017
From: Eric Dumazet <edumazet@google.com>
Date: Tue, 24 Jan 2017 15:18:07 -0800
Subject: proc: add a schedule point in proc_pid_readdir()
From: Eric Dumazet <edumazet@google.com>
[ 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@linux-foundation.org: coding style fix]
Link: http://lkml.kernel.org/r/1484238380.15816.42.camel@edumazet-glaptop3.roam.corp.google.com
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
fs/proc/base.c | 2 ++
1 file changed, 2 insertions(+)
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -3058,6 +3058,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@google.com are
queue-4.4/proc-add-a-schedule-point-in-proc_pid_readdir.patch
queue-4.4/ipv6-fix-flow-labels-when-the-traffic-class-is-non-0.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-15 14:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15 14:39 Patch "proc: add a schedule point in proc_pid_readdir()" has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox