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]
Date: Tue, 26 Mar 2024 11:03:05 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Zqiang <qiang.zhang1211@...il.com>
Cc: frederic@...nel.org, neeraj.upadhyay@...nel.org, joel@...lfernandes.org,
	rcu@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rcutorture: Make stall-tasks directly exit when
 rcutorture tests end

On Thu, Mar 21, 2024 at 04:28:50PM +0800, Zqiang wrote:
> When the rcutorture tests start to exit, the rcu_torture_cleanup() is
> invoked to stop kthreads and release resources, if the stall-task
> kthreads exist, cpu-stall has started and the rcutorture.stall_cpu
> is set to a larger value, the rcu_torture_cleanup() will be blocked
> for a long time and the hung-task may occur, this commit therefore
> add kthread_should_stop() to the loop of cpu-stall operation, when
> rcutorture tests ends, no need to wait for cpu-stall to end, exit
> directly.
> 
> Signed-off-by: Zqiang <qiang.zhang1211@...il.com>

Good eyes!

Queued for testing and further review, thank you!

							Thanx, Paul

> ---
>  kernel/rcu/rcutorture.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
> index 3f9c3766f52b..6a3cd6ed8b25 100644
> --- a/kernel/rcu/rcutorture.c
> +++ b/kernel/rcu/rcutorture.c
> @@ -2490,7 +2490,7 @@ static int rcu_torture_stall(void *args)
>  		pr_alert("%s start on CPU %d.\n",
>  			  __func__, raw_smp_processor_id());
>  		while (ULONG_CMP_LT((unsigned long)ktime_get_seconds(),
> -				    stop_at))
> +				    stop_at) && !kthread_should_stop())
>  			if (stall_cpu_block) {
>  #ifdef CONFIG_PREEMPTION
>  				preempt_schedule();
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ