The patch titled posix_timer: fix error path in timer_create has been added to the -mm tree. Its filename is posix_timer-fix-error-path-in-timer_create.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: posix_timer: fix error path in timer_create From: Andrey Vagin <avagin@xxxxxxxxxx> Move CLOCK_DISPATCH(which_clock, timer_create, (new_timer)) after all posible EFAULT erros. *_timer_create may allocate/get resources. (for example posix_cpu_timer_create does get_task_struct) Signed-off-by: Andrey Vagin <avagin@xxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Pavel Emelyanov <xemul@xxxxxxxxxx> Reviewed-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> Cc: Andrey Vagin <avagin@xxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: <stable@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/posix-timers.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff -puN kernel/posix-timers.c~posix_timer-fix-error-path-in-timer_create kernel/posix-timers.c --- a/kernel/posix-timers.c~posix_timer-fix-error-path-in-timer_create +++ a/kernel/posix-timers.c @@ -559,9 +559,6 @@ SYSCALL_DEFINE3(timer_create, const cloc new_timer->it_id = (timer_t) new_timer_id; new_timer->it_clock = which_clock; new_timer->it_overrun = -1; - error = CLOCK_DISPATCH(which_clock, timer_create, (new_timer)); - if (error) - goto out; if (copy_to_user(created_timer_id, &new_timer_id, sizeof (new_timer_id))) { @@ -593,6 +590,10 @@ SYSCALL_DEFINE3(timer_create, const cloc new_timer->sigq->info.si_tid = new_timer->it_id; 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); new_timer->it_signal = current->signal; list_add(&new_timer->list, ¤t->signal->posix_timers); _ Patches currently in -mm which might be from avagin@xxxxxxxxxx are posix_timer-remove-wrong-comment.patch posix_timer-fix-error-path-in-timer_create.patch posix_timer-move-copy_to_usercreated_timer_id-down-in-timer_create.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html