diff options
Diffstat (limited to 'kernel/posix-timers.c')
| -rw-r--r-- | kernel/posix-timers.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index dbd8398ddb0b..9a21681aa80f 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
| @@ -449,9 +449,6 @@ static void release_posix_timer(struct k_itimer *tmr, int it_id_set) | |||
| 449 | spin_unlock_irqrestore(&idr_lock, flags); | 449 | spin_unlock_irqrestore(&idr_lock, flags); |
| 450 | } | 450 | } |
| 451 | sigqueue_free(tmr->sigq); | 451 | sigqueue_free(tmr->sigq); |
| 452 | if (unlikely(tmr->it_process) && | ||
| 453 | tmr->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) | ||
| 454 | put_task_struct(tmr->it_process); | ||
| 455 | kmem_cache_free(posix_timers_cache, tmr); | 452 | kmem_cache_free(posix_timers_cache, tmr); |
| 456 | } | 453 | } |
| 457 | 454 | ||
| @@ -856,11 +853,10 @@ retry_delete: | |||
| 856 | * This keeps any tasks waiting on the spin lock from thinking | 853 | * This keeps any tasks waiting on the spin lock from thinking |
| 857 | * they got something (see the lock code above). | 854 | * they got something (see the lock code above). |
| 858 | */ | 855 | */ |
| 859 | if (timer->it_process) { | 856 | if (timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) |
| 860 | if (timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) | 857 | put_task_struct(timer->it_process); |
| 861 | put_task_struct(timer->it_process); | 858 | timer->it_process = NULL; |
| 862 | timer->it_process = NULL; | 859 | |
| 863 | } | ||
| 864 | unlock_timer(timer, flags); | 860 | unlock_timer(timer, flags); |
| 865 | release_posix_timer(timer, IT_ID_SET); | 861 | release_posix_timer(timer, IT_ID_SET); |
| 866 | return 0; | 862 | return 0; |
| @@ -885,11 +881,10 @@ retry_delete: | |||
| 885 | * This keeps any tasks waiting on the spin lock from thinking | 881 | * This keeps any tasks waiting on the spin lock from thinking |
| 886 | * they got something (see the lock code above). | 882 | * they got something (see the lock code above). |
| 887 | */ | 883 | */ |
| 888 | if (timer->it_process) { | 884 | if (timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) |
| 889 | if (timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) | 885 | put_task_struct(timer->it_process); |
| 890 | put_task_struct(timer->it_process); | 886 | timer->it_process = NULL; |
| 891 | timer->it_process = NULL; | 887 | |
| 892 | } | ||
| 893 | unlock_timer(timer, flags); | 888 | unlock_timer(timer, flags); |
| 894 | release_posix_timer(timer, IT_ID_SET); | 889 | release_posix_timer(timer, IT_ID_SET); |
| 895 | } | 890 | } |
