[PATCH] rcutorture: Skip debug object testing for cur_ops without ->debug_objects set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This commit make rcu_test_debug_objects() early return when the
specified cur_ops not set the ->debug_objects.

Signed-off-by: Zqiang <qiang.zhang1211@xxxxxxxxx>
---
 kernel/rcu/rcutorture.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 08bf7c669dd3..9b8c277ab91a 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -3495,8 +3495,9 @@ static void rcu_test_debug_objects(void)
 		return;
 	}
 
-	if (WARN_ON_ONCE(cur_ops->debug_objects &&
-			(!cur_ops->call || !cur_ops->cb_barrier)))
+	if (!cur_ops->debug_objects ||
+			WARN_ON_ONCE(cur_ops->debug_objects &&
+				(!cur_ops->call || !cur_ops->cb_barrier)))
 		return;
 
 	struct rcu_head *rhp = kmalloc(sizeof(*rhp), GFP_KERNEL);
-- 
2.17.1





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux