aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sched.h1
-rw-r--r--kernel/fork.c3
-rw-r--r--kernel/signal.c14
3 files changed, 2 insertions, 16 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ca1fd31aae97..69c2a1e1529e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1151,7 +1151,6 @@ extern void exit_thread(void);
1151extern void exit_files(struct task_struct *); 1151extern void exit_files(struct task_struct *);
1152extern void exit_signal(struct task_struct *); 1152extern void exit_signal(struct task_struct *);
1153extern void __exit_signal(struct task_struct *); 1153extern void __exit_signal(struct task_struct *);
1154extern void exit_sighand(struct task_struct *);
1155extern void __exit_sighand(struct task_struct *); 1154extern void __exit_sighand(struct task_struct *);
1156extern void exit_itimers(struct signal_struct *); 1155extern void exit_itimers(struct signal_struct *);
1157 1156
diff --git a/kernel/fork.c b/kernel/fork.c
index 33ffb5bf0dbc..8a46ad52be8f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1208,7 +1208,8 @@ bad_fork_cleanup_mm:
1208bad_fork_cleanup_signal: 1208bad_fork_cleanup_signal:
1209 exit_signal(p); 1209 exit_signal(p);
1210bad_fork_cleanup_sighand: 1210bad_fork_cleanup_sighand:
1211 exit_sighand(p); 1211 if (p->sighand)
1212 __exit_sighand(p);
1212bad_fork_cleanup_fs: 1213bad_fork_cleanup_fs:
1213 exit_fs(p); /* blocking */ 1214 exit_fs(p); /* blocking */
1214bad_fork_cleanup_files: 1215bad_fork_cleanup_files:
diff --git a/kernel/signal.c b/kernel/signal.c
index c5b65aa4c2bc..1d7f4463c32d 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -336,20 +336,6 @@ void __exit_sighand(struct task_struct *tsk)
336 kmem_cache_free(sighand_cachep, sighand); 336 kmem_cache_free(sighand_cachep, sighand);
337} 337}
338 338
339void exit_sighand(struct task_struct *tsk)
340{
341 write_lock_irq(&tasklist_lock);
342 rcu_read_lock();
343 if (tsk->sighand != NULL) {
344 struct sighand_struct *sighand = rcu_dereference(tsk->sighand);
345 spin_lock(&sighand->siglock);
346 __exit_sighand(tsk);
347 spin_unlock(&sighand->siglock);
348 }
349 rcu_read_unlock();
350 write_unlock_irq(&tasklist_lock);
351}
352
353/* 339/*
354 * This function expects the tasklist_lock write-locked. 340 * This function expects the tasklist_lock write-locked.
355 */ 341 */