[PATCH] 4.9.263-rt177: Balance local_irq_{disable,enable} in irq_forced_thread_fn

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Balance local_irq_{disable,enable} usage in irq_forced_thread_fn

Re: 0152-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch

In 4.9.263-rt177, irq_forced_thread_fn has potentially unbalanced calls to
local_irq_disable ... local_irq_enable.  This is probably not intentional.

I am not absolutely sure what the proper fix is.  Attached is an example
of what that might look like.

[ Issue detected via compiler warning, using a sufficiently advanced gcc ]

Signed-off-by: Joe Korty <joe.korty@xxxxxxxxxxxxxxxxx>

Index: b/kernel/irq/manage.c
===================================================================
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1035,6 +1035,9 @@ irq_forced_thread_fn(struct irq_desc *de
 		atomic_inc(&desc->threads_handled);
 
 	irq_finalize_oneshot(desc, action);
+
+	if (!IS_ENABLED(CONFIG_PREEMPT_RT_BASE))
+		local_irq_enable();
 	/*
 	 * Interrupts which have real time requirements can be set up
 	 * to avoid softirq processing in the thread handler. This is
@@ -1043,8 +1046,6 @@ irq_forced_thread_fn(struct irq_desc *de
 	if (irq_settings_no_softirq_call(desc))
 		_local_bh_enable();
 	else
-		if (!IS_ENABLED(CONFIG_PREEMPT_RT_BASE))
-			local_irq_enable();
 		local_bh_enable();
 	return ret;
 }



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux