Patch "tick/rcu: Fix false positive "softirq work is pending" messages" has been added to the 6.5-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    tick/rcu: Fix false positive "softirq work is pending" messages

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tick-rcu-fix-false-positive-softirq-work-is-pending-.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit d1dcbbee155f888f0582f7759a548762b3c7963a
Author: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
Date:   Fri Aug 18 16:07:57 2023 -0400

    tick/rcu: Fix false positive "softirq work is pending" messages
    
    [ Upstream commit 96c1fa04f089a7e977a44e4e8fdc92e81be20bef ]
    
    In commit 0345691b24c0 ("tick/rcu: Stop allowing RCU_SOFTIRQ in idle") the
    new function report_idle_softirq() was created by breaking code out of the
    existing can_stop_idle_tick() for kernels v5.18 and newer.
    
    In doing so, the code essentially went from a one conditional:
    
            if (a && b && c)
                    warn();
    
    to a three conditional:
    
            if (!a)
                    return;
            if (!b)
                    return;
            if (!c)
                    return;
            warn();
    
    But that conversion got the condition for the RT specific
    local_bh_blocked() wrong. The original condition was:
    
            !local_bh_blocked()
    
    but the conversion failed to negate it so it ended up as:
    
            if (!local_bh_blocked())
                    return false;
    
    This issue lay dormant until another fixup for the same commit was added
    in commit a7e282c77785 ("tick/rcu: Fix bogus ratelimit condition").
    This commit realized the ratelimit was essentially set to zero instead
    of ten, and hence *no* softirq pending messages would ever be issued.
    
    Once this commit was backported via linux-stable, both the v6.1 and v6.4
    preempt-rt kernels started printing out 10 instances of this at boot:
    
      NOHZ tick-stop error: local softirq work is pending, handler #80!!!
    
    Remove the negation and return when local_bh_blocked() evaluates to true to
    bring the correct behaviour back.
    
    Fixes: 0345691b24c0 ("tick/rcu: Stop allowing RCU_SOFTIRQ in idle")
    Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
    Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
    Tested-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
    Reviewed-by: Wen Yang <wenyang.linux@xxxxxxxxxxx>
    Acked-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230818200757.1808398-1-paul.gortmaker@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 4df14db4da490..87015e9deacc9 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -1045,7 +1045,7 @@ static bool report_idle_softirq(void)
 		return false;
 
 	/* On RT, softirqs handling may be waiting on some lock */
-	if (!local_bh_blocked())
+	if (local_bh_blocked())
 		return false;
 
 	pr_warn("NOHZ tick-stop error: local softirq work is pending, handler #%02x!!!\n",



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux