Hi. On Thursday 22 June 2006 21:34, Johannes Berg wrote: > On Thu, 2006-06-22 at 13:13 +0200, Johannes Berg wrote: > > Thanks, I'll look and submit a patch. It does try_to_freeze() but also > > checks for pending signals. > > Ah. The code is just in the wrong order: > while (!kthread_should_stop()) { > try_to_freeze(); > ... > schedule_timeout_interruptible(...); > if (signal_pending()) > break; > } > > Would it be correct to just move the try_to_freeze() before the > signal_pending() statement? Hmm. Will kthread_should_stop() be set if it should really exit? If so, perhaps you can just remove the signal_pending() check. Otherwise, you'd want to change the signal_pending() test to something like the "if (signal_pending() && !try_to_freeze())" to avoid any possibility of a race. (In this case, you should be able to remove the try_to_freeze() from above). Regards, Nigel -- Nigel, Michelle and Alisdair Cunningham 5 Mitchell Street Cobden 3266 Victoria, Australia