diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/base.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 03c8d747be48..f223a56e613c 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -3109,6 +3109,9 @@ static struct task_struct *first_tid(struct task_struct *leader, | |||
3109 | pos = NULL; | 3109 | pos = NULL; |
3110 | if (nr && nr >= get_nr_threads(leader)) | 3110 | if (nr && nr >= get_nr_threads(leader)) |
3111 | goto out; | 3111 | goto out; |
3112 | /* It could be unhashed before we take rcu lock */ | ||
3113 | if (!pid_alive(leader)) | ||
3114 | goto out; | ||
3112 | 3115 | ||
3113 | /* If we haven't found our starting place yet start | 3116 | /* If we haven't found our starting place yet start |
3114 | * with the leader and walk nr threads forward. | 3117 | * with the leader and walk nr threads forward. |