- proc-remove-tasklist_lock-from-proc_pid_readdir.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     proc: Remove tasklist_lock from proc_pid_readdir

has been removed from the -mm tree.  Its filename is

     proc-remove-tasklist_lock-from-proc_pid_readdir.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: proc: Remove tasklist_lock from proc_pid_readdir
From: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>


We don't need the tasklist_lock to safely iterate through processes
anymore.

This depends on my previous to task patches that make get_task_struct rcu
safe, and that make next_task() rcu safe.  I haven't gotten
first_tid/next_tid yet only because next_thread is missing an
rcu_dereference.

Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/proc/base.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -puN fs/proc/base.c~proc-remove-tasklist_lock-from-proc_pid_readdir fs/proc/base.c
--- a/fs/proc/base.c~proc-remove-tasklist_lock-from-proc_pid_readdir
+++ a/fs/proc/base.c
@@ -2043,7 +2043,7 @@ out:
 static struct task_struct *first_tgid(int tgid, int nr)
 {
 	struct task_struct *pos = NULL;
-	read_lock(&tasklist_lock);
+	rcu_read_lock();
 	if (tgid && nr) {
 		pos = find_task_by_pid(tgid);
 		if (pos && !thread_group_leader(pos))
@@ -2069,7 +2069,7 @@ static struct task_struct *first_tgid(in
 	}
 	pos = NULL;
 done:
-	read_unlock(&tasklist_lock);
+	rcu_read_unlock();
 	return pos;
 }
 
@@ -2082,7 +2082,7 @@ done:
 static struct task_struct *next_tgid(struct task_struct *start)
 {
 	struct task_struct *pos;
-	read_lock(&tasklist_lock);
+	rcu_read_lock();
 	pos = start;
 	if (pid_alive(start))
 		pos = next_task(start);
@@ -2092,7 +2092,7 @@ static struct task_struct *next_tgid(str
 	}
 	pos = NULL;
 done:
-	read_unlock(&tasklist_lock);
+	rcu_read_unlock();
 	put_task_struct(start);
 	return pos;
 }
_

Patches currently in -mm which might be from ebiederm@xxxxxxxxxxxx are

origin.patch
powerpc-adding-the-use-of-the-firmware-soft-reset-nmi-to-kdump.patch
proc-sysctl-add-_proc_do_string-helper.patch
namespaces-add-nsproxy.patch
namespaces-add-nsproxy-dont-include-compileh.patch
namespaces-incorporate-fs-namespace-into-nsproxy.patch
namespaces-utsname-introduce-temporary-helpers.patch
namespaces-utsname-switch-to-using-uts-namespaces.patch
namespaces-utsname-switch-to-using-uts-namespaces-alpha-fix.patch
namespaces-utsname-switch-to-using-uts-namespaces-cleanup.patch
namespaces-utsname-use-init_utsname-when-appropriate.patch
namespaces-utsname-use-init_utsname-when-appropriate-cifs-update.patch
namespaces-utsname-implement-utsname-namespaces.patch
namespaces-utsname-implement-utsname-namespaces-export.patch
namespaces-utsname-implement-utsname-namespaces-dont-include-compileh.patch
namespaces-utsname-sysctl-hack.patch
namespaces-utsname-sysctl-hack-cleanup.patch
namespaces-utsname-sysctl-hack-cleanup-2.patch
namespaces-utsname-sysctl-hack-cleanup-2-fix.patch
namespaces-utsname-remove-system_utsname.patch
namespaces-utsname-implement-clone_newuts-flag.patch
uts-copy-nsproxy-only-when-needed.patch
ipc-namespace-core-fix.patch
ipc-namespace-core-unshare-fix.patch
ipc-namespace-utils-compilation-fix.patch
genirq-irq-document-what-an-irq-is.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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux