From: Rusty Russell Date: Sat, 13 Jun 2009 04:27:02 +0000 (-0600) Subject: lguest: fix race in halt code X-Git-Tag: v2.6.31-rc1~368^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abd41f037e1a64543000ed73b42f616d04d92700;p=pandora-kernel.git lguest: fix race in halt code When the Guest does the LHCALL_HALT hypercall, we go to sleep, expecting that a timer or the Waker will wake_up_process() us. But we do it in a stupid way, leaving a classic missing wakeup race. So split maybe_do_interrupt() into interrupt_pending() and try_deliver_interrupt(), and check maybe_do_interrupt() and the "break_out" flag before calling schedule. Signed-off-by: Rusty Russell --- Reading git-diff-tree failed