diff options
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index a28840b11b89..bb63fa1d34a2 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -164,7 +164,6 @@ static struct fs_struct *get_fs_struct(struct task_struct *task) | |||
164 | 164 | ||
165 | static int get_nr_threads(struct task_struct *tsk) | 165 | static int get_nr_threads(struct task_struct *tsk) |
166 | { | 166 | { |
167 | /* Must be called with the rcu_read_lock held */ | ||
168 | unsigned long flags; | 167 | unsigned long flags; |
169 | int count = 0; | 168 | int count = 0; |
170 | 169 | ||
@@ -471,14 +470,10 @@ static int proc_pid_limits(struct task_struct *task, char *buffer) | |||
471 | 470 | ||
472 | struct rlimit rlim[RLIM_NLIMITS]; | 471 | struct rlimit rlim[RLIM_NLIMITS]; |
473 | 472 | ||
474 | rcu_read_lock(); | 473 | if (!lock_task_sighand(task, &flags)) |
475 | if (!lock_task_sighand(task,&flags)) { | ||
476 | rcu_read_unlock(); | ||
477 | return 0; | 474 | return 0; |
478 | } | ||
479 | memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS); | 475 | memcpy(rlim, task->signal->rlim, sizeof(struct rlimit) * RLIM_NLIMITS); |
480 | unlock_task_sighand(task, &flags); | 476 | unlock_task_sighand(task, &flags); |
481 | rcu_read_unlock(); | ||
482 | 477 | ||
483 | /* | 478 | /* |
484 | * print the file header | 479 | * print the file header |
@@ -3088,9 +3083,7 @@ static int proc_task_getattr(struct vfsmount *mnt, struct dentry *dentry, struct | |||
3088 | generic_fillattr(inode, stat); | 3083 | generic_fillattr(inode, stat); |
3089 | 3084 | ||
3090 | if (p) { | 3085 | if (p) { |
3091 | rcu_read_lock(); | ||
3092 | stat->nlink += get_nr_threads(p); | 3086 | stat->nlink += get_nr_threads(p); |
3093 | rcu_read_unlock(); | ||
3094 | put_task_struct(p); | 3087 | put_task_struct(p); |
3095 | } | 3088 | } |
3096 | 3089 | ||