lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220422144421.GX4285@paulmck-ThinkPad-P17-Gen-1>
Date:   Fri, 22 Apr 2022 07:44:21 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Zqiang <qiang1.zhang@...el.com>
Cc:     frederic@...nel.org, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcu: Put panic_on_rcu_stall() after expedited RCU CPU
 stall warnings

On Fri, Apr 22, 2022 at 09:15:18PM +0800, Zqiang wrote:
> When the expedited RCU CPU stall warning is treated as panic, if
> it's triggered, the stall info should be printed first and tell us
> reason, rather than directly panic.
> 
> Signed-off-by: Zqiang <qiang1.zhang@...el.com>

Good eyes, thank you!

Queued for v5.20, with the wordsmithing shown below.  Please let me
know if I messed anything up.

							Thanx, Paul

------------------------------------------------------------------------

commit e5215598af9bdf5509c7e7c6f896f50df0cdaf4b
Author: Zqiang <qiang1.zhang@...el.com>
Date:   Fri Apr 22 21:15:18 2022 +0800

    rcu: Put panic_on_rcu_stall() after expedited RCU CPU stall warnings
    
    When a normal RCU CPU stall warning is encountered with the
    panic_on_rcu_stall sysfs variable is set, the system panics only after
    the stall warning is printed.  But when an expedited RCU CPU stall
    warning is encountered with the panic_on_rcu_stall sysfs variable is
    set, the system panics first, thus never printing the stall warning.
    This commit therefore brings the expedited stall warning into line with
    the normal stall warning by printing first and panicking afterwards.
    
    Signed-off-by: Zqiang <qiang1.zhang@...el.com>
    Signed-off-by: Paul E. McKenney <paulmck@...nel.org>

diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h
index 571b0a700cce..f05a15b11fa0 100644
--- a/kernel/rcu/tree_exp.h
+++ b/kernel/rcu/tree_exp.h
@@ -623,7 +623,6 @@ static void synchronize_rcu_expedited_wait(void)
 			return;
 		if (rcu_stall_is_suppressed())
 			continue;
-		panic_on_rcu_stall();
 		trace_rcu_stall_warning(rcu_state.name, TPS("ExpeditedStall"));
 		pr_err("INFO: %s detected expedited stalls on CPUs/tasks: {",
 		       rcu_state.name);
@@ -671,6 +670,7 @@ static void synchronize_rcu_expedited_wait(void)
 			}
 		}
 		jiffies_stall = 3 * rcu_exp_jiffies_till_stall_check() + 3;
+		panic_on_rcu_stall();
 	}
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ