Oleg Nesterov 834d216e1f signalfd: fix interaction with posix-timers
dequeue_signal:

	if (__SI_TIMER) {
		spin_unlock(&tsk->sighand->siglock);
		do_schedule_next_timer(info);
		spin_lock(&tsk->sighand->siglock);
	}

Unless tsk == curent, this is absolutely unsafe: nothing prevents tsk from
exiting. If signalfd was passed to another process, do_schedule_next_timer()
is just wrong.

Add yet another "tsk == current" check into dequeue_signal().

This patch fixes an oopsable bug, but breaks the scheduling of posix timers
if the shared __SI_TIMER signal was fetched via signalfd attached to another
sub-thread. Mostly fixed by the next patch.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Roland McGrath <roland@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-22 19:52:46 -07:00
..
2007-08-22 19:52:44 -07:00
2007-07-16 09:05:47 -07:00
2007-08-22 19:52:44 -07:00
2007-07-16 12:05:49 +03:00
2007-07-18 08:47:40 -07:00
2006-12-07 08:39:36 -08:00
2007-07-16 09:05:50 -07:00
2007-07-26 11:33:06 -07:00
2007-08-11 15:47:42 -07:00
2007-07-20 12:01:34 -07:00
2006-12-04 02:00:22 -05:00
2007-07-31 15:39:40 -07:00
2007-07-16 09:05:47 -07:00
2007-07-19 10:04:49 -07:00
2007-08-22 19:52:46 -07:00
2007-08-11 15:47:42 -07:00
2007-07-16 09:05:49 -07:00
2007-07-16 09:05:49 -07:00
2007-07-16 09:05:49 -07:00
2007-08-12 18:08:19 +02:00
2007-07-16 09:05:50 -07:00
2007-05-09 08:57:56 +02:00
2007-07-17 10:23:03 -07:00