diff options
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r-- | kernel/posix-timers.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 55b3761edaa9..7a15afb73ed0 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
@@ -547,9 +547,9 @@ sys_timer_create(const clockid_t which_clock, | |||
547 | new_timer->it_process = process; | 547 | new_timer->it_process = process; |
548 | list_add(&new_timer->list, | 548 | list_add(&new_timer->list, |
549 | &process->signal->posix_timers); | 549 | &process->signal->posix_timers); |
550 | spin_unlock_irqrestore(&process->sighand->siglock, flags); | ||
551 | if (new_timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) | 550 | if (new_timer->it_sigev_notify == (SIGEV_SIGNAL|SIGEV_THREAD_ID)) |
552 | get_task_struct(process); | 551 | get_task_struct(process); |
552 | spin_unlock_irqrestore(&process->sighand->siglock, flags); | ||
553 | } else { | 553 | } else { |
554 | spin_unlock_irqrestore(&process->sighand->siglock, flags); | 554 | spin_unlock_irqrestore(&process->sighand->siglock, flags); |
555 | process = NULL; | 555 | process = NULL; |
@@ -605,13 +605,14 @@ static struct k_itimer * lock_timer(timer_t timer_id, unsigned long *flags) | |||
605 | timr = (struct k_itimer *) idr_find(&posix_timers_id, (int) timer_id); | 605 | timr = (struct k_itimer *) idr_find(&posix_timers_id, (int) timer_id); |
606 | if (timr) { | 606 | if (timr) { |
607 | spin_lock(&timr->it_lock); | 607 | spin_lock(&timr->it_lock); |
608 | spin_unlock(&idr_lock); | ||
609 | 608 | ||
610 | if ((timr->it_id != timer_id) || !(timr->it_process) || | 609 | if ((timr->it_id != timer_id) || !(timr->it_process) || |
611 | timr->it_process->tgid != current->tgid) { | 610 | timr->it_process->tgid != current->tgid) { |
612 | unlock_timer(timr, *flags); | 611 | spin_unlock(&timr->it_lock); |
612 | spin_unlock_irqrestore(&idr_lock, *flags); | ||
613 | timr = NULL; | 613 | timr = NULL; |
614 | } | 614 | } else |
615 | spin_unlock(&idr_lock); | ||
615 | } else | 616 | } else |
616 | spin_unlock_irqrestore(&idr_lock, *flags); | 617 | spin_unlock_irqrestore(&idr_lock, *flags); |
617 | 618 | ||