diff options
Diffstat (limited to 'kernel/pid.c')
| -rw-r--r-- | kernel/pid.c | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/pid.c b/kernel/pid.c index d55c6fb8d087..39b65b69584f 100644 --- a/kernel/pid.c +++ b/kernel/pid.c  | |||
| @@ -401,7 +401,7 @@ struct task_struct *pid_task(struct pid *pid, enum pid_type type) | |||
| 401 | struct task_struct *result = NULL; | 401 | struct task_struct *result = NULL; | 
| 402 | if (pid) { | 402 | if (pid) { | 
| 403 | struct hlist_node *first; | 403 | struct hlist_node *first; | 
| 404 | first = rcu_dereference_check(pid->tasks[type].first, | 404 | first = rcu_dereference_check(hlist_first_rcu(&pid->tasks[type]), | 
| 405 | rcu_read_lock_held() || | 405 | rcu_read_lock_held() || | 
| 406 | lockdep_tasklist_lock_is_held()); | 406 | lockdep_tasklist_lock_is_held()); | 
| 407 | if (first) | 407 | if (first) | 
| @@ -416,6 +416,7 @@ EXPORT_SYMBOL(pid_task); | |||
| 416 | */ | 416 | */ | 
| 417 | struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns) | 417 | struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns) | 
| 418 | { | 418 | { | 
| 419 | rcu_lockdep_assert(rcu_read_lock_held()); | ||
| 419 | return pid_task(find_pid_ns(nr, ns), PIDTYPE_PID); | 420 | return pid_task(find_pid_ns(nr, ns), PIDTYPE_PID); | 
| 420 | } | 421 | } | 
| 421 | 422 | ||
