From: Paul E. McKenney Date: Thu, 18 Aug 2011 16:30:32 +0000 (-0700) Subject: rcu: Make rcu_torture_boost() exit loops at end of test X-Git-Tag: next-20110829~18^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1bc68bd0cfa66b82d006a3482771558f42b88919;p=karo-tx-linux.git rcu: Make rcu_torture_boost() exit loops at end of test One of the loops in rcu_torture_boost() fails to check kthread_should_stop(), and thus might be slowing or even stopping completion of rcutorture tests at rmmod time. This commit adds the kthread_should_stop() check to the offending loop. Signed-off-by: Paul E. McKenney Signed-off-by: Paul E. McKenney --- diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index eb739c03c143..76fe8936c32e 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c @@ -779,7 +779,8 @@ static int rcu_torture_boost(void *arg) * interval. Besides, we are running at RT priority, * so delays should be relatively rare. */ - while (oldstarttime == boost_starttime) { + while (oldstarttime == boost_starttime && + !kthread_should_stop()) { if (mutex_trylock(&boost_mutex)) { boost_starttime = jiffies + test_boost_interval * HZ;