diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-01-31 19:46:34 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-02-21 12:06:09 -0500 |
commit | 7129d383d9f46eb8276bee5fb46df63f09a70130 (patch) | |
tree | e2570ffb2f2146d2b6a87ff3505e9c9d824c3a6c /kernel/rcutorture.c | |
parent | 236fefafe5d3d34b78ed2ccf5510909716112326 (diff) |
rcu: Trace only after NULL-pointer check
Fix a bonehead error introduced when adding event tracing to rcutorture.
Move the traces to follow the NULL-pointer checks.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutorture.c')
-rw-r--r-- | kernel/rcutorture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c index 5cfa23be43bd..ed1c72bd9c09 100644 --- a/kernel/rcutorture.c +++ b/kernel/rcutorture.c | |||
@@ -1000,12 +1000,12 @@ static void rcu_torture_timer(unsigned long unused) | |||
1000 | rcu_read_lock_bh_held() || | 1000 | rcu_read_lock_bh_held() || |
1001 | rcu_read_lock_sched_held() || | 1001 | rcu_read_lock_sched_held() || |
1002 | srcu_read_lock_held(&srcu_ctl)); | 1002 | srcu_read_lock_held(&srcu_ctl)); |
1003 | do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu); | ||
1004 | if (p == NULL) { | 1003 | if (p == NULL) { |
1005 | /* Leave because rcu_torture_writer is not yet underway */ | 1004 | /* Leave because rcu_torture_writer is not yet underway */ |
1006 | cur_ops->readunlock(idx); | 1005 | cur_ops->readunlock(idx); |
1007 | return; | 1006 | return; |
1008 | } | 1007 | } |
1008 | do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu); | ||
1009 | if (p->rtort_mbtest == 0) | 1009 | if (p->rtort_mbtest == 0) |
1010 | atomic_inc(&n_rcu_torture_mberror); | 1010 | atomic_inc(&n_rcu_torture_mberror); |
1011 | spin_lock(&rand_lock); | 1011 | spin_lock(&rand_lock); |
@@ -1063,13 +1063,13 @@ rcu_torture_reader(void *arg) | |||
1063 | rcu_read_lock_bh_held() || | 1063 | rcu_read_lock_bh_held() || |
1064 | rcu_read_lock_sched_held() || | 1064 | rcu_read_lock_sched_held() || |
1065 | srcu_read_lock_held(&srcu_ctl)); | 1065 | srcu_read_lock_held(&srcu_ctl)); |
1066 | do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu); | ||
1067 | if (p == NULL) { | 1066 | if (p == NULL) { |
1068 | /* Wait for rcu_torture_writer to get underway */ | 1067 | /* Wait for rcu_torture_writer to get underway */ |
1069 | cur_ops->readunlock(idx); | 1068 | cur_ops->readunlock(idx); |
1070 | schedule_timeout_interruptible(HZ); | 1069 | schedule_timeout_interruptible(HZ); |
1071 | continue; | 1070 | continue; |
1072 | } | 1071 | } |
1072 | do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu); | ||
1073 | if (p->rtort_mbtest == 0) | 1073 | if (p->rtort_mbtest == 0) |
1074 | atomic_inc(&n_rcu_torture_mberror); | 1074 | atomic_inc(&n_rcu_torture_mberror); |
1075 | cur_ops->read_delay(&rand); | 1075 | cur_ops->read_delay(&rand); |