Repository navigation
Commit 2d860ad
genirq: prevent wakeup of freed irq thread
free_irq() can remove an irqaction while the corresponding interrupt
is in progress, but free_irq() sets action->thread to NULL
unconditionally, which might lead to a NULL pointer dereference in
handle_IRQ_event() when the hard interrupt context tries to wake up
the handler thread.
Prevent this by moving the thread stop after synchronize_irq(). No
need to set action->thread to NULL either as action is going to be
freed anyway.
This fixes a boot crash reported against preempt-rt which uses the
mainline irq threads code to implement full irq threading.
[ tglx: removed local irqthread variable ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>1 parent 3493e84 commit 2d860ad
1 file changed
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
761 | 761 | | |
762 | 762 | | |
763 | 763 | | |
764 | | - | |
765 | 764 | | |
766 | 765 | | |
767 | 766 | | |
| |||
809 | 808 | | |
810 | 809 | | |
811 | 810 | | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | 811 | | |
816 | 812 | | |
817 | 813 | | |
818 | 814 | | |
819 | 815 | | |
820 | 816 | | |
821 | 817 | | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | 818 | | |
829 | 819 | | |
830 | 820 | | |
| |||
840 | 830 | | |
841 | 831 | | |
842 | 832 | | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
843 | 840 | | |
844 | 841 | | |
845 | 842 | | |
| |||
0 commit comments