Skip to content

Commit ed60ad7

Browse files
committed
refscale: Warn on individual ref_scale_init() error conditions
When running refscale as a module, any ref_scale_init() issues will be reflected in the error code from modprobe or insmod, as the case may be. However, these error codes are not available when running refscale built-in, for example, when using the kvm.sh script. This commit therefore adds WARN_ON_ONCE() to allow distinguishing ref_scale_init() errors when running refscale built-in. Signed-off-by: Paul E. McKenney <[email protected]>
1 parent b3b3cc6 commit ed60ad7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/rcu/refscale.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ ref_scale_init(void)
824824
init_waitqueue_head(&shutdown_wq);
825825
firsterr = torture_create_kthread(ref_scale_shutdown, NULL,
826826
shutdown_task);
827-
if (firsterr)
827+
if (torture_init_error(firsterr))
828828
goto unwind;
829829
schedule_timeout_uninterruptible(1);
830830
}
@@ -851,7 +851,7 @@ ref_scale_init(void)
851851
for (i = 0; i < nreaders; i++) {
852852
firsterr = torture_create_kthread(ref_scale_reader, (void *)i,
853853
reader_tasks[i].task);
854-
if (firsterr)
854+
if (torture_init_error(firsterr))
855855
goto unwind;
856856

857857
init_waitqueue_head(&(reader_tasks[i].wq));
@@ -860,7 +860,7 @@ ref_scale_init(void)
860860
// Main Task
861861
init_waitqueue_head(&main_wq);
862862
firsterr = torture_create_kthread(main_func, NULL, main_task);
863-
if (firsterr)
863+
if (torture_init_error(firsterr))
864864
goto unwind;
865865

866866
torture_init_end();

0 commit comments

Comments
 (0)