posix_timer: Fix error path in timer_create
authorAndrey Vagin <avagin@openvz.org>
Mon, 24 May 2010 19:15:33 +0000 (12:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:15:29 +0000 (11:15 -0700)
commitb22ecc4e19d402ead68014587bf2e290aa856d65
tree530f74067f564be304553de5fdd7c19f33a49b58
parentb2bdae6d2cf82649fee2640adc334d41f5038185
posix_timer: Fix error path in timer_create

commit 45e0fffc8a7778282e6a1514a6ae3e7ae6545111 upstream.

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)

[ tglx: fold the remove crappy comment patch into this ]

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Emelyanov <xemul@openvz.org>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/posix-timers.c