diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 16:12:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 16:12:36 -0400 |
commit | af390084359a5de20046c901529b2b6a50b941cb (patch) | |
tree | b73a6261d1b1f9fb34432cc9a47411a49330b8dc /kernel/posix-timers.c | |
parent | 7645e4320497b35ce9fb6c2269ebcd57af9fe735 (diff) | |
parent | 0fcb80818bc3ade5befd409051089f710adcf7b0 (diff) |
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
Documentation: Add timers/timers-howto.txt
timer: Added usleep_range timer
Revert "timer: Added usleep[_range] timer"
clockevents: Remove the per cpu tick skew
posix_timer: Move copy_to_user(created_timer_id) down in timer_create()
timer: Added usleep[_range] timer
timers: Document meaning of deferrable timer
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r-- | kernel/posix-timers.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index ad723420acc3..9ca4973f736d 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c | |||
@@ -560,11 +560,6 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock, | |||
560 | new_timer->it_clock = which_clock; | 560 | new_timer->it_clock = which_clock; |
561 | new_timer->it_overrun = -1; | 561 | new_timer->it_overrun = -1; |
562 | 562 | ||
563 | if (copy_to_user(created_timer_id, | ||
564 | &new_timer_id, sizeof (new_timer_id))) { | ||
565 | error = -EFAULT; | ||
566 | goto out; | ||
567 | } | ||
568 | if (timer_event_spec) { | 563 | if (timer_event_spec) { |
569 | if (copy_from_user(&event, timer_event_spec, sizeof (event))) { | 564 | if (copy_from_user(&event, timer_event_spec, sizeof (event))) { |
570 | error = -EFAULT; | 565 | error = -EFAULT; |
@@ -590,6 +585,12 @@ SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock, | |||
590 | new_timer->sigq->info.si_tid = new_timer->it_id; | 585 | new_timer->sigq->info.si_tid = new_timer->it_id; |
591 | new_timer->sigq->info.si_code = SI_TIMER; | 586 | new_timer->sigq->info.si_code = SI_TIMER; |
592 | 587 | ||
588 | if (copy_to_user(created_timer_id, | ||
589 | &new_timer_id, sizeof (new_timer_id))) { | ||
590 | error = -EFAULT; | ||
591 | goto out; | ||
592 | } | ||
593 | |||
593 | error = CLOCK_DISPATCH(which_clock, timer_create, (new_timer)); | 594 | error = CLOCK_DISPATCH(which_clock, timer_create, (new_timer)); |
594 | if (error) | 595 | if (error) |
595 | goto out; | 596 | goto out; |