Messages in this thread | | | Date | Sun, 5 Oct 2003 17:19:16 +0100 | From | Russell King <> | Subject | Re: JFFS2 swsusp / signal cleanup. |
| |
On Sun, Oct 05, 2003 at 06:11:55PM +0200, Pavel Machek wrote: > Is flush_signals() really so stupid to do? Goal was to make > modifications to code as simple as possible, and as most pieces do not > expect to be interrupted, pretending signal never happened seems like > good idea...
What if that signal was necessary for the operation of the thread, and dropping it would cause a problem?
Since you're effectively using signal handling to cause a false pending signal indication, surely the correct cleanup is to re-calculate the pending signal indication. That way, we won't be throwing away signals.
I'm also wondering if there could be a problem with (ab)using TASK_STOPPED here - could a stopped task be woken prematurely and thereby sent spinning in refrigerator() by a non-stopped process sending a SIGCONT at just the right time?
Maybe we want a TASK_FROZEN state to describe the "frozen, may not be woken by anything except thawing" state?
-- Russell King (rmk@arm.linux.org.uk) http://www.arm.linux.org.uk/personal/ Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core - 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/
| |