handle_stop_signal() clears SIGNAL_STOP_DEQUEUED when sig == SIGKILL. Remove
this nasty special case. It was needed to prevent the race with group stop and
exit caused by thread-specific SIGKILL. Now that we use complete_signal() for
private signals too this is not needed, complete_signal() will notice SIGKILL
and abort the soon-to-begin group stop.
Except: the target thread is dead (has PF_EXITING). But in that case we should
not just clear SIGNAL_STOP_DEQUEUED and nothing more. We should either kill
the whole thread group, or silently ignore the signal.
I suspect we are not right wrt zombie leaders, but this is another issue which
and should be fixed separately. Note that this check can't abort the group stop
if it was already started/finished, this check only adds a subtle side effect
if we race with the thread which has already dequeued sig_kernel_stop() signal
and temporary released ->siglock.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- 25/kernel/signal.c~7_HSS_NO_KILL 2008-03-09 17:48:28.000000000 +0300
+++ 25/kernel/signal.c 2008-03-09 20:21:02.000000000 +0300
@@ -643,12 +643,6 @@ static void handle_stop_signal(int sig,
*/
signal->flags &= ~SIGNAL_STOP_DEQUEUED;
}
- } else if (sig == SIGKILL) {
- /*
- * Make sure that any pending stop signal already dequeued
- * is undone by the wakeup for SIGKILL.
- */
- signal->flags &= ~SIGNAL_STOP_DEQUEUED;
}
}
--
| Kamalesh Babulal | Re: 2.6.23-rc6-mm1 |
| Bart Van Assche | Integration of SCST in the mainstream Linux kernel |
| Gabriel C | Re: 2.6.22-rc6-mm1 |
| Linus Torvalds | Linux 2.6.27 |
git: | |
| Linus Torvalds | [PATCH 1/6] diff-lib: use ce_mode_from_stat() rather than messing with modes manua... |
| Joakim Tjernlund | git-svn set-tree bug |
| Francis Moreau | emacs and git... |
| Bill Lear | Meaning of "fatal: protocol error: bad line length character"? |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| ropers | Re: About Xen: maybe a reiterative question but .. |
| Richard Stallman | Real men don't attack straw men |
| Hans Reiser | Re: silent semantic changes with reiser4 |
| Phillip Lougher | [ANN] Squashfs 3.3 released |
| Jeff Garzik | Re: [Ext2-devel] [RFC 0/13] extents and 48bit ext3 |
| Valerie Henson | Re: [RFD] Incremental fsck |
| How to make my PCIE ATA storage device running in Linux | 5 hours ago | Linux general |
| sata/ide timeout errors on asus server-mb | 9 hours ago | Linux kernel |
| Shared swap partition | 9 hours ago | Linux general |
| usb mic not detected | 13 hours ago | Applications and Utilities |
| Problem in Inserting a module | 14 hours ago | Linux kernel |
| Treason Uncloaked | 20 hours ago | Linux kernel |
| high memory | 3 days ago | Linux kernel |
| semaphore access speed | 3 days ago | Applications and Utilities |
| the kernel how to power off the machine | 3 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
