diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -780,18 +780,12 @@ static int de_thread(struct task_struct *tsk) | |||
780 | int count; | 780 | int count; |
781 | 781 | ||
782 | /* | 782 | /* |
783 | * Tell all the sighand listeners that this sighand has | ||
784 | * been detached. The signalfd_detach() function grabs the | ||
785 | * sighand lock, if signal listeners are present on the sighand. | ||
786 | */ | ||
787 | signalfd_detach(tsk); | ||
788 | |||
789 | /* | ||
790 | * If we don't share sighandlers, then we aren't sharing anything | 783 | * If we don't share sighandlers, then we aren't sharing anything |
791 | * and we can just re-use it all. | 784 | * and we can just re-use it all. |
792 | */ | 785 | */ |
793 | if (atomic_read(&oldsighand->count) <= 1) { | 786 | if (atomic_read(&oldsighand->count) <= 1) { |
794 | BUG_ON(atomic_read(&sig->count) != 1); | 787 | BUG_ON(atomic_read(&sig->count) != 1); |
788 | signalfd_detach(tsk); | ||
795 | exit_itimers(sig); | 789 | exit_itimers(sig); |
796 | return 0; | 790 | return 0; |
797 | } | 791 | } |
@@ -930,6 +924,7 @@ static int de_thread(struct task_struct *tsk) | |||
930 | sig->flags = 0; | 924 | sig->flags = 0; |
931 | 925 | ||
932 | no_thread_group: | 926 | no_thread_group: |
927 | signalfd_detach(tsk); | ||
933 | exit_itimers(sig); | 928 | exit_itimers(sig); |
934 | if (leader) | 929 | if (leader) |
935 | release_task(leader); | 930 | release_task(leader); |