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]
Date:   Wed, 17 Feb 2021 19:58:02 +0800
From:   qiang.zhang@...driver.com
To:     tj@...nel.org, jiangshanlai@...il.com, htejun@...il.com
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] workqueue: Remove rcu_read_lock/unlock() in workqueue_congested()

From: Zqiang <qiang.zhang@...driver.com>

The RCU read critical area already by preempt_disable/enable()
(equivalent to rcu_read_lock_sched/unlock_sched()) mark, so remove
rcu_read_lock/unlock().

Signed-off-by: Zqiang <qiang.zhang@...driver.com>
---
 kernel/workqueue.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 0d150da252e8..c599835ad6c3 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4540,7 +4540,6 @@ bool workqueue_congested(int cpu, struct workqueue_struct *wq)
 	struct pool_workqueue *pwq;
 	bool ret;
 
-	rcu_read_lock();
 	preempt_disable();
 
 	if (cpu == WORK_CPU_UNBOUND)
@@ -4553,7 +4552,6 @@ bool workqueue_congested(int cpu, struct workqueue_struct *wq)
 
 	ret = !list_empty(&pwq->delayed_works);
 	preempt_enable();
-	rcu_read_unlock();
 
 	return ret;
 }
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ