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-next>] [day] [month] [year] [list]
Message-Id: <1681264483-5208-1-git-send-email-zhouzhouyi@gmail.com>
Date:   Wed, 12 Apr 2023 09:54:43 +0800
From:   zhouzhouyi@...il.com
To:     paulmck@...nel.org, rcu@...r.kernel.org,
        linux-kernel@...r.kernel.org, lance@...osl.org
Cc:     Zhouyi Zhou <zhouzhouyi@...il.com>
Subject: [PATCH] rcu/torture replace wait_event with wait_event_interruptible

From: Zhouyi Zhou <zhouzhouyi@...il.com>

In kfree_rcu_test, kfree_scale_shutdown will be detected as hung task
if kfree_loops is too big. Replace wait_event with wait_event_interruptible
to avoid false positive.

Tested in the PPC VM of Open Source Lab of Oregon State University.

Signed-off-by: Zhouyi Zhou <zhouzhouyi@...il.com>                
---
 kernel/rcu/rcuscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/rcuscale.c b/kernel/rcu/rcuscale.c
index 91fb5905a008..b37eec94957c 100644
--- a/kernel/rcu/rcuscale.c
+++ b/kernel/rcu/rcuscale.c
@@ -771,7 +771,7 @@ kfree_scale_cleanup(void)
 static int
 kfree_scale_shutdown(void *arg)
 {
-	wait_event(shutdown_wq,
+	wait_event_interruptible(shutdown_wq,
 		   atomic_read(&n_kfree_scale_thread_ended) >= kfree_nrealthreads);
 
 	smp_mb(); /* Wake before output. */
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ