Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

posix-cpu-timers: Stop disabling timers on mt-exec

The reasons why the extra posix_cpu_timers_exit_group() invocation has been
added are not entirely clear from the commit message. Today all that
posix_cpu_timers_exit_group() does is stop timers that are tracking the
task from firing. Every other operation on those timers is still allowed.

The practical implication of this is posix_cpu_timer_del() which could
not get the siglock after the thread group leader has exited (because
sighand == NULL) would be able to run successfully because the timer
was already dequeued.

With that locking issue fixed there is no point in disabling all of the
timers. So remove this ``tempoary'' hack.

Fixes: e0a70217107e ("posix-cpu-timers: workaround to suppress the problems with mt exec")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/87o8tityzs.fsf@x220.int.ebiederm.org


authored by

Eric W. Biederman and committed by
Thomas Gleixner
b95e31c0 55e8c8eb

+1 -10
+1 -10
kernel/exit.c
··· 103 103 104 104 #ifdef CONFIG_POSIX_TIMERS 105 105 posix_cpu_timers_exit(tsk); 106 - if (group_dead) { 106 + if (group_dead) 107 107 posix_cpu_timers_exit_group(tsk); 108 - } else { 109 - /* 110 - * This can only happen if the caller is de_thread(). 111 - * FIXME: this is the temporary hack, we should teach 112 - * posix-cpu-timers to handle this case correctly. 113 - */ 114 - if (unlikely(has_group_leader_pid(tsk))) 115 - posix_cpu_timers_exit_group(tsk); 116 - } 117 108 #endif 118 109 119 110 if (group_dead) {