|
@@ -559,14 +559,7 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
|
|
new_timer->it_id = (timer_t) new_timer_id;
|
|
new_timer->it_id = (timer_t) new_timer_id;
|
|
new_timer->it_clock = which_clock;
|
|
new_timer->it_clock = which_clock;
|
|
new_timer->it_overrun = -1;
|
|
new_timer->it_overrun = -1;
|
|
- error = CLOCK_DISPATCH(which_clock, timer_create, (new_timer));
|
|
|
|
- if (error)
|
|
|
|
- goto out;
|
|
|
|
|
|
|
|
- /*
|
|
|
|
- * return the timer_id now. The next step is hard to
|
|
|
|
- * back out if there is an error.
|
|
|
|
- */
|
|
|
|
if (copy_to_user(created_timer_id,
|
|
if (copy_to_user(created_timer_id,
|
|
&new_timer_id, sizeof (new_timer_id))) {
|
|
&new_timer_id, sizeof (new_timer_id))) {
|
|
error = -EFAULT;
|
|
error = -EFAULT;
|
|
@@ -597,6 +590,10 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
|
|
new_timer->sigq->info.si_tid = new_timer->it_id;
|
|
new_timer->sigq->info.si_tid = new_timer->it_id;
|
|
new_timer->sigq->info.si_code = SI_TIMER;
|
|
new_timer->sigq->info.si_code = SI_TIMER;
|
|
|
|
|
|
|
|
+ error = CLOCK_DISPATCH(which_clock, timer_create, (new_timer));
|
|
|
|
+ if (error)
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
spin_lock_irq(¤t->sighand->siglock);
|
|
spin_lock_irq(¤t->sighand->siglock);
|
|
new_timer->it_signal = current->signal;
|
|
new_timer->it_signal = current->signal;
|
|
list_add(&new_timer->list, ¤t->signal->posix_timers);
|
|
list_add(&new_timer->list, ¤t->signal->posix_timers);
|