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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1516694381-20333-11-git-send-email-lianglihao@huawei.com>
Date:   Tue, 23 Jan 2018 15:59:35 +0800
From:   <lianglihao@...wei.com>
To:     <paulmck@...ux.vnet.ibm.com>
CC:     <guohanjun@...wei.com>, <heng.z@...wei.com>, <hb.chen@...wei.com>,
        <lihao.liang@...il.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH RFC 10/16] rcutorture: Test call_prcu() and prcu_barrier()

From: Lihao Liang <lianglihao@...wei.com>

Signed-off-by: Lihao Liang <lianglihao@...wei.com>
---
 kernel/rcu/prcu.c       | 4 +++-
 kernel/rcu/rcutorture.c | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/rcu/prcu.c b/kernel/rcu/prcu.c
index 2664d091..49cb70e6 100644
--- a/kernel/rcu/prcu.c
+++ b/kernel/rcu/prcu.c
@@ -179,8 +179,10 @@ void call_prcu(struct rcu_head *head, rcu_callback_t func)
 
 	/* Use GFP_ATOMIC with IRQs disabled */
 	vhp = kmalloc(sizeof(struct prcu_version_head), GFP_ATOMIC);
-	if (!vhp)
+	if (!vhp) {
+		WARN_ON(1);
 		return;
+	}
 
 	head->func = func;
 	head->next = NULL;
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 7d65bf0c..9215ebb0 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -797,8 +797,8 @@ static struct rcu_torture_ops prcu_ops = {
 	.exp_sync	= synchronize_prcu,
 	.get_state	= NULL,
 	.cond_sync	= NULL,
-	.call		= NULL,
-	.cb_barrier	= NULL,
+	.call		= call_prcu,
+	.cb_barrier	= prcu_barrier,
 	.fqs		= NULL,
 	.stats		= NULL,
 	.irq_capable	= 1,
-- 
2.14.1.729.g59c0ea183

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ