public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* Patch "proc: add a schedule point in proc_pid_readdir()" has been added to the 4.9-stable tree
@ 2017-06-15 14:27 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-06-15 14:27 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.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@vger.kernel.org> know about it.


>From foo@baz Thu Jun 15 16:23:30 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
@@ -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@google.com 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-15 14:27 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:27 Patch "proc: add a schedule point in proc_pid_readdir()" has been added to the 4.9-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