Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 27922b4260f65d317aabda37e42bbbff > files > 2074

kernel-2.6.18-238.el5.src.rpm

From: Neil Horman <nhorman@redhat.com>
Date: Wed, 23 Apr 2008 11:28:09 -0400
Subject: [misc] /proc/pid/limits : fix duplicate array entries
Message-id: 20080423152809.GD29825@hmsendeavour.rdu.redhat.com
O-Subject: [RHEL 5.3 patch] /proc/pid/limits : fix duplicate array entries that lead to multiple files with same name
Bugzilla: 443522
RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com>

Hey all-
	Noticed that somehow the patch I did recently to add /proc/pid/limits to
/proc/<pid> duplicated an entry in the array where those files are ennumerated
in the kernel.  The result is that /proc/<pid>/limits is listed twice when you
read that directory, instead of just once as it should be.  This patch corrects
that.

Regards
Neil

 fs/proc/base.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 5227dbb..60c6761 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -247,7 +247,6 @@ static struct pid_entry tgid_base_stuff[] = {
 	E(PROC_TGID_LOGINUID, "loginuid", S_IFREG|S_IWUSR|S_IRUGO),
 #endif
 	E(PROC_TGID_LIMITS, "limits", S_IFREG|S_IRUSR),
-	E(PROC_TID_LIMITS, "limits", S_IFREG|S_IRUSR),
 #if defined(USE_ELF_CORE_DUMP) && defined(CONFIG_ELF_CORE)
 	E(PROC_TGID_COREDUMP_FILTER, "coredump_filter",
 	  S_IFREG|S_IRUGO|S_IWUSR),
@@ -295,7 +294,6 @@ static struct pid_entry tid_base_stuff[] = {
 #ifdef CONFIG_AUDITSYSCALL
 	E(PROC_TID_LOGINUID, "loginuid", S_IFREG|S_IWUSR|S_IRUGO),
 #endif
-	E(PROC_TGID_LIMITS, "limits", S_IFREG|S_IRUSR),
 	E(PROC_TID_LIMITS, "limits", S_IFREG|S_IRUSR),
 
 	{0,0,NULL,0}