]> git.karo-electronics.de Git - karo-tx-linux.git/commit
signalfd: make it group-wide, fix posix-timers scheduling
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 22 Aug 2007 21:01:48 +0000 (14:01 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 31 Aug 2007 06:01:01 +0000 (23:01 -0700)
commitb0f4f52ccbc546a587b5306a317be086d5fcadd8
treea4023ff46a88a6bc61e63e5aba72ac57c1b2d803
parent68159e50ef135abc07fb2b866ade8655e93d17cb
signalfd: make it group-wide, fix posix-timers scheduling

With this patch any thread can dequeue its own private signals via signalfd,
even if it was created by another sub-thread.

To do so, we pass "current" to dequeue_signal() if the caller is from the same
thread group. This also fixes the scheduling of posix timers broken by the
previous patch.

If the caller doesn't belong to this thread group, we can't handle __SI_TIMER
case properly anyway. Perhaps we should forbid the cross-process signalfd usage
and convert ctx->tsk to ctx->sighand.

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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/exec.c
fs/signalfd.c