@@ -3037,7 +3037,7 @@ rcu_torture_init(void)
3037
3037
rcu_torture_write_types ();
3038
3038
firsterr = torture_create_kthread (rcu_torture_writer , NULL ,
3039
3039
writer_task );
3040
- if (firsterr )
3040
+ if (torture_init_error ( firsterr ) )
3041
3041
goto unwind ;
3042
3042
if (nfakewriters > 0 ) {
3043
3043
fakewriter_tasks = kcalloc (nfakewriters ,
@@ -3052,7 +3052,7 @@ rcu_torture_init(void)
3052
3052
for (i = 0 ; i < nfakewriters ; i ++ ) {
3053
3053
firsterr = torture_create_kthread (rcu_torture_fakewriter ,
3054
3054
NULL , fakewriter_tasks [i ]);
3055
- if (firsterr )
3055
+ if (torture_init_error ( firsterr ) )
3056
3056
goto unwind ;
3057
3057
}
3058
3058
reader_tasks = kcalloc (nrealreaders , sizeof (reader_tasks [0 ]),
@@ -3068,7 +3068,7 @@ rcu_torture_init(void)
3068
3068
rcu_torture_reader_mbchk [i ].rtc_chkrdr = -1 ;
3069
3069
firsterr = torture_create_kthread (rcu_torture_reader , (void * )i ,
3070
3070
reader_tasks [i ]);
3071
- if (firsterr )
3071
+ if (torture_init_error ( firsterr ) )
3072
3072
goto unwind ;
3073
3073
}
3074
3074
nrealnocbers = nocbs_nthreads ;
@@ -3088,18 +3088,18 @@ rcu_torture_init(void)
3088
3088
}
3089
3089
for (i = 0 ; i < nrealnocbers ; i ++ ) {
3090
3090
firsterr = torture_create_kthread (rcu_nocb_toggle , NULL , nocb_tasks [i ]);
3091
- if (firsterr )
3091
+ if (torture_init_error ( firsterr ) )
3092
3092
goto unwind ;
3093
3093
}
3094
3094
if (stat_interval > 0 ) {
3095
3095
firsterr = torture_create_kthread (rcu_torture_stats , NULL ,
3096
3096
stats_task );
3097
- if (firsterr )
3097
+ if (torture_init_error ( firsterr ) )
3098
3098
goto unwind ;
3099
3099
}
3100
3100
if (test_no_idle_hz && shuffle_interval > 0 ) {
3101
3101
firsterr = torture_shuffle_init (shuffle_interval * HZ );
3102
- if (firsterr )
3102
+ if (torture_init_error ( firsterr ) )
3103
3103
goto unwind ;
3104
3104
}
3105
3105
if (stutter < 0 )
@@ -3109,7 +3109,7 @@ rcu_torture_init(void)
3109
3109
3110
3110
t = cur_ops -> stall_dur ? cur_ops -> stall_dur () : stutter * HZ ;
3111
3111
firsterr = torture_stutter_init (stutter * HZ , t );
3112
- if (firsterr )
3112
+ if (torture_init_error ( firsterr ) )
3113
3113
goto unwind ;
3114
3114
}
3115
3115
if (fqs_duration < 0 )
@@ -3118,7 +3118,7 @@ rcu_torture_init(void)
3118
3118
/* Create the fqs thread */
3119
3119
firsterr = torture_create_kthread (rcu_torture_fqs , NULL ,
3120
3120
fqs_task );
3121
- if (firsterr )
3121
+ if (torture_init_error ( firsterr ) )
3122
3122
goto unwind ;
3123
3123
}
3124
3124
if (test_boost_interval < 1 )
@@ -3132,7 +3132,7 @@ rcu_torture_init(void)
3132
3132
firsterr = cpuhp_setup_state (CPUHP_AP_ONLINE_DYN , "RCU_TORTURE" ,
3133
3133
rcutorture_booster_init ,
3134
3134
rcutorture_booster_cleanup );
3135
- if (firsterr < 0 )
3135
+ if (torture_init_error ( firsterr ) )
3136
3136
goto unwind ;
3137
3137
rcutor_hp = firsterr ;
3138
3138
@@ -3153,23 +3153,23 @@ rcu_torture_init(void)
3153
3153
}
3154
3154
shutdown_jiffies = jiffies + shutdown_secs * HZ ;
3155
3155
firsterr = torture_shutdown_init (shutdown_secs , rcu_torture_cleanup );
3156
- if (firsterr )
3156
+ if (torture_init_error ( firsterr ) )
3157
3157
goto unwind ;
3158
3158
firsterr = torture_onoff_init (onoff_holdoff * HZ , onoff_interval ,
3159
3159
rcutorture_sync );
3160
- if (firsterr )
3160
+ if (torture_init_error ( firsterr ) )
3161
3161
goto unwind ;
3162
3162
firsterr = rcu_torture_stall_init ();
3163
- if (firsterr )
3163
+ if (torture_init_error ( firsterr ) )
3164
3164
goto unwind ;
3165
3165
firsterr = rcu_torture_fwd_prog_init ();
3166
- if (firsterr )
3166
+ if (torture_init_error ( firsterr ) )
3167
3167
goto unwind ;
3168
3168
firsterr = rcu_torture_barrier_init ();
3169
- if (firsterr )
3169
+ if (torture_init_error ( firsterr ) )
3170
3170
goto unwind ;
3171
3171
firsterr = rcu_torture_read_exit_init ();
3172
- if (firsterr )
3172
+ if (torture_init_error ( firsterr ) )
3173
3173
goto unwind ;
3174
3174
if (object_debug )
3175
3175
rcu_test_debug_objects ();
0 commit comments