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: <b8fdfee6-793b-4c88-9af4-152e4803f7b2@paulmck-laptop>
Date:   Fri, 3 Nov 2023 14:13:11 -0700
From:   "Paul E. McKenney" <paulmck@...nel.org>
To:     Zqiang <qiang.zhang1211@...il.com>
Cc:     frederic@...nel.org, joel@...lfernandes.org, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcutorture: Add fqs_holdoff check before the fqs_task is
 created

On Fri, Nov 03, 2023 at 03:26:39PM +0800, Zqiang wrote:
> For rcutorture tests that support fqs operations and set fqs_duration
> greater than zero, the fqs_task kthread will be created. but if the
> fqs_holdoff is not set, the default value is zero, this cause fqs_task
> enter a long-term busy loop and won't voluntarily give up the CPU until
> stopped by kthread_stop(). this commit therefore add for fqs_holdoff check
> before the fqs_task is created, make sure the fqs_task is created when
> the fqs_holdoff is also greater than zero.
> 
> Signed-off-by: Zqiang <qiang.zhang1211@...il.com>

Queued and pushed, thank you!

							Thanx, Paul

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

commit 964f05cdec9f84be006fd836d64d04e79a50cb31
Author: Zqiang <qiang.zhang1211@...il.com>
Date:   Fri Nov 3 15:26:39 2023 +0800

    rcutorture: Add fqs_holdoff check before fqs_task is created
    
    For rcutorture tests on RCU implementations that support
    force-quiescent-state operations and that set the fqs_duration module
    parameter greater than zero, the fqs_task kthread will be created.
    However, if the fqs_holdoff module parameter is not set, then its default
    value of zero will cause fqs_task enter a long-term busy loop until
    stopped by kthread_stop().  This commit therefore adds a fqs_holdoff
    check before the fqs_task is created, making sure that whenever the
    fqs_task is created, the fqs_holdoff will be greater than zero.
    
    Signed-off-by: Zqiang <qiang.zhang1211@...il.com>
    Signed-off-by: Paul E. McKenney <paulmck@...nel.org>

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 83999e57b3eaf..9f0e6c1cad443 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -3886,7 +3886,9 @@ rcu_torture_init(void)
 	}
 	if (fqs_duration < 0)
 		fqs_duration = 0;
-	if (fqs_duration) {
+	if (fqs_holdoff < 0)
+		fqs_holdoff = 0;
+	if (fqs_duration && fqs_holdoff) {
 		/* Create the fqs thread */
 		firsterr = torture_create_kthread(rcu_torture_fqs, NULL,
 						  fqs_task);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ