mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
genirq: No need to check IRQTF_DIED before stopping a thread handler
Since 63706172f3 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: Oleg Nesterov <[email protected]>
Signed-off-by: Alexander Gordeev <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
4bcdf1d0b6
commit
05d74efa3c
1 changed files with 2 additions and 4 deletions
|
|
@ -1106,8 +1106,7 @@ out_thread:
|
|||
struct task_struct *t = new->thread;
|
||||
|
||||
new->thread = NULL;
|
||||
if (likely(!test_bit(IRQTF_DIED, &new->thread_flags)))
|
||||
kthread_stop(t);
|
||||
kthread_stop(t);
|
||||
put_task_struct(t);
|
||||
}
|
||||
out_mput:
|
||||
|
|
@ -1217,8 +1216,7 @@ 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);
|
||||
kthread_stop(action->thread);
|
||||
put_task_struct(action->thread);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue