Re: [PATCH 1/3] genirq: Get rid of unneeded force parameter inirq_finalize_oneshot()

From: Thomas Gleixner
Date: Thu Mar 22 2012 - 06:32:34 EST


On Mon, 19 Mar 2012, Alexander Gordeev wrote:

> The only place irq_finalize_oneshot() is called with force parameter set
> is the threaded handler error exit path. But IRQTF_RUNTHREAD is dropped
> at this point and irq_wake_thread() is not going to reset it again,
> since PF_EXITING is set for this thread already. So we will drop the
> thread's bit in threads_oneshot anyway and the force parameter is
> superfluous.

Wrong.

CPU 0 CPU 1

do_exit()
check(PF_EXITING)
set_bit(IRQTF_RUNTHREAD)
...
set(PF_EXITING)
exit_irq_thread()

if (test_bit(IRQTF_RUNTHREAD))
goto out;

-> FAIL

Thanks,

tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/