Messages in this thread Patch in this message | | | Date | Fri, 10 Oct 2003 12:14:35 +0200 | From | Pavel Machek <> | Subject | [pm] Better method of getting rid of signals |
| |
Hi!
recalc_sigpending() seems like better idea, since it does not have potential to kill some signal. Now with proper locking. Please apply,
Pavel
--- tmp/linux/kernel/power/process.c 2003-08-27 12:00:53.000000000 +0200 +++ linux/kernel/power/process.c 2003-10-09 11:21:14.000000000 +0200 @@ -49,10 +49,11 @@ pr_debug("%s entered refrigerator\n", current->comm); printk("="); current->flags &= ~PF_FREEZE; - if (flag) - flush_signals(current); /* We have signaled a kernel thread, which isn't normal behaviour - and that may lead to 100%CPU sucking because those threads - just don't manage signals. */ + + spin_lock_irq(¤t->sighand->siglock); + recalc_sigpending(); /* We sent fake signal, clean it up */ + spin_unlock_irq(¤t->sighand->siglock); + current->flags |= PF_FROZEN; while (current->flags & PF_FROZEN) schedule(); -- When do you have a heart between your knees? [Johanka's followup: and *two* hearts?] - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |