Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05d74efa authored by Alexander Gordeev's avatar Alexander Gordeev Committed by Thomas Gleixner
Browse files

genirq: No need to check IRQTF_DIED before stopping a thread handler



Since 63706172 kthread_stop() is not
afraid of dead kernel threads. So no need to check if a thread is
alive before stopping it. These checks still were racy.

Reported-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarAlexander Gordeev <agordeev@redhat.com>
Link: http://lkml.kernel.org/r/20120309135939.GC2114@dhcp-26-207.brq.redhat.com


Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 4bcdf1d0
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1106,7 +1106,6 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, struct irqaction *new)
		struct task_struct *t = new->thread;

		new->thread = NULL;
		if (likely(!test_bit(IRQTF_DIED, &new->thread_flags)))
		kthread_stop(t);
		put_task_struct(t);
	}
@@ -1217,7 +1216,6 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
#endif

	if (action->thread) {
		if (!test_bit(IRQTF_DIED, &action->thread_flags))
		kthread_stop(action->thread);
		put_task_struct(action->thread);
	}