[PATCH] irq_pipeline: Prevent returning to user space with pending inband IRQs

Jan Kiszka jan.kiszka at web.de
Sun Jun 6 14:35:48 CEST 2021

From: Jan Kiszka <jan.kiszka at siemens.com>

The correct order is hard IRQs off first, then stalling inband, see also
I-pipe. Otherwise, we risk to take an interrupt for the inband stage but
do not inject it before returning to user space.

Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>

Fixes the RCU stalls Florian reported, at least for me.

I'm afraid this wasn't the last regression of translating I-pipe into

 include/linux/entry-common.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h
index 0fb45b2d6094..00540110985e 100644
--- a/include/linux/entry-common.h
+++ b/include/linux/entry-common.h
@@ -203,7 +203,8 @@ static inline void local_irq_disable_exit_to_user(void);
 #ifndef local_irq_disable_exit_to_user
 static inline void local_irq_disable_exit_to_user(void)
-	local_irq_disable_full();
+	hard_cond_local_irq_disable();
+	local_irq_disable();


More information about the Xenomai mailing list