linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RT 4.19] rcutorture: Fix oops when selecting non-default torture_type
@ 2019-03-22  3:21 Scott Wood
  2019-03-22  9:22 ` Sebastian Andrzej Siewior
  2019-03-22 14:50 ` Paul E. McKenney
  0 siblings, 2 replies; 3+ messages in thread
From: Scott Wood @ 2019-03-22  3:21 UTC (permalink / raw)
  To: Thomas Gleixner, Sebastian Andrzej Siewior
  Cc: linux-rt-users, linux-kernel, Paul E. McKenney, Juri Lelli,
	Scott Wood

rcu_bh is disabled on PREEMPT_RT via a stub ops that has no name.  Thus,
if a torture_type other than "rcu" is used, rcu_torture_init() will
pass NULL to strcmp() when iterating over torture_ops[], and oops.

Signed-off-by: Scott Wood <swood@redhat.com>
---
With this applied to 4.19.25-rt16 and specifying torture_type=sched,
similar rcutorture failures are seen as with 5.0.3-rt1 (in which standard
torture_cype=rcu no longer has .extendables=0 and thus stresses similar
paths).

 kernel/rcu/rcutorture.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 7d2a615601e7..408d03048911 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -479,6 +479,7 @@ static struct rcu_torture_ops rcu_bh_ops = {
 #else
 static struct rcu_torture_ops rcu_bh_ops = {
 	.ttype		= INVALID_RCU_FLAVOR,
+	.name		= "rcu_bh"
 };
 #endif
 
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-22 14:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-22  3:21 [PATCH RT 4.19] rcutorture: Fix oops when selecting non-default torture_type Scott Wood
2019-03-22  9:22 ` Sebastian Andrzej Siewior
2019-03-22 14:50 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).