diff options
Diffstat (limited to 'kernel/rcutorture.c')
-rw-r--r-- | kernel/rcutorture.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index adda92bfafac..5f43f30fcd1d 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c | |||
@@ -796,7 +796,11 @@ static void rcu_torture_timer(unsigned long unused) | |||
796 | 796 | ||
797 | idx = cur_ops->readlock(); | 797 | idx = cur_ops->readlock(); |
798 | completed = cur_ops->completed(); | 798 | completed = cur_ops->completed(); |
799 | p = rcu_dereference(rcu_torture_current); | 799 | p = rcu_dereference_check(rcu_torture_current, |
800 | rcu_read_lock_held() || | ||
801 | rcu_read_lock_bh_held() || | ||
802 | rcu_read_lock_sched_held() || | ||
803 | srcu_read_lock_held(&srcu_ctl)); | ||
800 | if (p == NULL) { | 804 | if (p == NULL) { |
801 | /* Leave because rcu_torture_writer is not yet underway */ | 805 | /* Leave because rcu_torture_writer is not yet underway */ |
802 | cur_ops->readunlock(idx); | 806 | cur_ops->readunlock(idx); |
@@ -853,7 +857,11 @@ rcu_torture_reader(void *arg) | |||
853 | } | 857 | } |
854 | idx = cur_ops->readlock(); | 858 | idx = cur_ops->readlock(); |
855 | completed = cur_ops->completed(); | 859 | completed = cur_ops->completed(); |
856 | p = rcu_dereference(rcu_torture_current); | 860 | p = rcu_dereference_check(rcu_torture_current, |
861 | rcu_read_lock_held() || | ||
862 | rcu_read_lock_bh_held() || | ||
863 | rcu_read_lock_sched_held() || | ||
864 | srcu_read_lock_held(&srcu_ctl)); | ||
857 | if (p == NULL) { | 865 | if (p == NULL) { |
858 | /* Wait for rcu_torture_writer to get underway */ | 866 | /* Wait for rcu_torture_writer to get underway */ |
859 | cur_ops->readunlock(idx); | 867 | cur_ops->readunlock(idx); |