aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-timers.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r--kernel/posix-timers.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 0ffaeb075e35..e36d5798cbff 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -458,9 +458,6 @@ static void release_posix_timer(struct k_itimer *tmr, int it_id_set)
458 spin_unlock_irqrestore(&idr_lock, flags); 458 spin_unlock_irqrestore(&idr_lock, flags);
459 } 459 }
460 sigqueue_free(tmr->sigq); 460 sigqueue_free(tmr->sigq);
461 if (unlikely(tmr->it_process) &&
462 tmr->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID))
463 put_task_struct(tmr->it_process);
464 kmem_cache_free(posix_timers_cache, tmr); 461 kmem_cache_free(posix_timers_cache, tmr);
465} 462}
466 463
@@ -865,11 +862,10 @@ retry_delete:
865 * This keeps any tasks waiting on the spin lock from thinking 862 * This keeps any tasks waiting on the spin lock from thinking
866 * they got something (see the lock code above). 863 * they got something (see the lock code above).
867 */ 864 */
868 if (timer->it_process) { 865 if (timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID))
869 if (timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) 866 put_task_struct(timer->it_process);
870 put_task_struct(timer->it_process); 867 timer->it_process = NULL;
871 timer->it_process = NULL; 868
872 }
873 unlock_timer(timer, flags); 869 unlock_timer(timer, flags);
874 release_posix_timer(timer, IT_ID_SET); 870 release_posix_timer(timer, IT_ID_SET);
875 return 0; 871 return 0;
@@ -894,11 +890,10 @@ retry_delete:
894 * This keeps any tasks waiting on the spin lock from thinking 890 * This keeps any tasks waiting on the spin lock from thinking
895 * they got something (see the lock code above). 891 * they got something (see the lock code above).
896 */ 892 */
897 if (timer->it_process) { 893 if (timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID))
898 if (timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) 894 put_task_struct(timer->it_process);
899 put_task_struct(timer->it_process); 895 timer->it_process = NULL;
900 timer->it_process = NULL; 896
901 }
902 unlock_timer(timer, flags); 897 unlock_timer(timer, flags);
903 release_posix_timer(timer, IT_ID_SET); 898 release_posix_timer(timer, IT_ID_SET);
904} 899}