Searched hist:e2c12739ccf76aae12e9e949526a475b9d17adaa (Results 1 – 3 of 3) sorted by relevance
/openbmc/linux/kernel/irq/ |
H A D | internals.h | diff e2c12739ccf76aae12e9e949526a475b9d17adaa Thu Jul 06 09:22:25 CDT 2023 Vincent Whitchurch <vincent.whitchurch@axis.com> genirq: Prevent nested thread vs synchronize_hardirq() deadlock
There is a possibility of deadlock if synchronize_hardirq() is called when the nested threaded interrupt is active. The following scenario was observed on a uniprocessor PREEMPT_NONE system:
Thread 1 Thread 2
handle_nested_thread() Set INPROGRESS Call ->thread_fn() thread_fn goes to sleep
free_irq() __synchronize_hardirq() Busy-loop forever waiting for INPROGRESS to be cleared
The INPROGRESS flag is only supposed to be used for hard interrupt handlers. Remove the incorrect usage in the nested threaded interrupt case and instead re-use the threads_active / wait_for_threads mechanism to wait for nested threaded interrupts to complete.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230613-genirq-nested-v3-1-ae58221143eb@axis.com
|
H A D | chip.c | diff e2c12739ccf76aae12e9e949526a475b9d17adaa Thu Jul 06 09:22:25 CDT 2023 Vincent Whitchurch <vincent.whitchurch@axis.com> genirq: Prevent nested thread vs synchronize_hardirq() deadlock
There is a possibility of deadlock if synchronize_hardirq() is called when the nested threaded interrupt is active. The following scenario was observed on a uniprocessor PREEMPT_NONE system:
Thread 1 Thread 2
handle_nested_thread() Set INPROGRESS Call ->thread_fn() thread_fn goes to sleep
free_irq() __synchronize_hardirq() Busy-loop forever waiting for INPROGRESS to be cleared
The INPROGRESS flag is only supposed to be used for hard interrupt handlers. Remove the incorrect usage in the nested threaded interrupt case and instead re-use the threads_active / wait_for_threads mechanism to wait for nested threaded interrupts to complete.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230613-genirq-nested-v3-1-ae58221143eb@axis.com
|
H A D | manage.c | diff e2c12739ccf76aae12e9e949526a475b9d17adaa Thu Jul 06 09:22:25 CDT 2023 Vincent Whitchurch <vincent.whitchurch@axis.com> genirq: Prevent nested thread vs synchronize_hardirq() deadlock
There is a possibility of deadlock if synchronize_hardirq() is called when the nested threaded interrupt is active. The following scenario was observed on a uniprocessor PREEMPT_NONE system:
Thread 1 Thread 2
handle_nested_thread() Set INPROGRESS Call ->thread_fn() thread_fn goes to sleep
free_irq() __synchronize_hardirq() Busy-loop forever waiting for INPROGRESS to be cleared
The INPROGRESS flag is only supposed to be used for hard interrupt handlers. Remove the incorrect usage in the nested threaded interrupt case and instead re-use the threads_active / wait_for_threads mechanism to wait for nested threaded interrupts to complete.
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230613-genirq-nested-v3-1-ae58221143eb@axis.com
|