diff options
Diffstat (limited to 'kernel/rcutorture.c')
-rw-r--r-- | kernel/rcutorture.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 98ae7d168225..27003e2421c7 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c | |||
@@ -125,6 +125,13 @@ static struct list_head rcu_torture_removed; | |||
125 | 125 | ||
126 | static int stutter_pause_test = 0; | 126 | static int stutter_pause_test = 0; |
127 | 127 | ||
128 | #if defined(MODULE) || defined(CONFIG_RCU_TORTURE_TEST_RUNNABLE) | ||
129 | #define RCUTORTURE_RUNNABLE_INIT 1 | ||
130 | #else | ||
131 | #define RCUTORTURE_RUNNABLE_INIT 0 | ||
132 | #endif | ||
133 | int rcutorture_runnable = RCUTORTURE_RUNNABLE_INIT; | ||
134 | |||
128 | /* | 135 | /* |
129 | * Allocate an element from the rcu_tortures pool. | 136 | * Allocate an element from the rcu_tortures pool. |
130 | */ | 137 | */ |
@@ -188,7 +195,7 @@ rcu_random(struct rcu_random_state *rrsp) | |||
188 | static void | 195 | static void |
189 | rcu_stutter_wait(void) | 196 | rcu_stutter_wait(void) |
190 | { | 197 | { |
191 | while (stutter_pause_test) | 198 | while (stutter_pause_test || !rcutorture_runnable) |
192 | schedule_timeout_interruptible(1); | 199 | schedule_timeout_interruptible(1); |
193 | } | 200 | } |
194 | 201 | ||