diff options
-rw-r--r-- | kernel/signal.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 29aca40be33f..4a45bac2c632 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -971,13 +971,11 @@ int __fatal_signal_pending(struct task_struct *tsk) | |||
971 | } | 971 | } |
972 | EXPORT_SYMBOL(__fatal_signal_pending); | 972 | EXPORT_SYMBOL(__fatal_signal_pending); |
973 | 973 | ||
974 | /* | ||
975 | * Must be called under rcu_read_lock() or with tasklist_lock read-held. | ||
976 | */ | ||
977 | struct sighand_struct *lock_task_sighand(struct task_struct *tsk, unsigned long *flags) | 974 | struct sighand_struct *lock_task_sighand(struct task_struct *tsk, unsigned long *flags) |
978 | { | 975 | { |
979 | struct sighand_struct *sighand; | 976 | struct sighand_struct *sighand; |
980 | 977 | ||
978 | rcu_read_lock(); | ||
981 | for (;;) { | 979 | for (;;) { |
982 | sighand = rcu_dereference(tsk->sighand); | 980 | sighand = rcu_dereference(tsk->sighand); |
983 | if (unlikely(sighand == NULL)) | 981 | if (unlikely(sighand == NULL)) |
@@ -988,6 +986,7 @@ struct sighand_struct *lock_task_sighand(struct task_struct *tsk, unsigned long | |||
988 | break; | 986 | break; |
989 | spin_unlock_irqrestore(&sighand->siglock, *flags); | 987 | spin_unlock_irqrestore(&sighand->siglock, *flags); |
990 | } | 988 | } |
989 | rcu_read_unlock(); | ||
991 | 990 | ||
992 | return sighand; | 991 | return sighand; |
993 | } | 992 | } |