bpf: Clobber stack slot when writing over spilled PTR_TO_BTF_ID
[platform/kernel/linux-starfive.git] / kernel / torture.c
index ef27a6c..789aeb0 100644 (file)
@@ -911,7 +911,7 @@ void torture_kthread_stopping(char *title)
 {
        char buf[128];
 
-       snprintf(buf, sizeof(buf), "Stopping %s", title);
+       snprintf(buf, sizeof(buf), "%s is stopping", title);
        VERBOSE_TOROUT_STRING(buf);
        while (!kthread_should_stop()) {
                torture_shutdown_absorb(title);
@@ -931,12 +931,14 @@ int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
        int ret = 0;
 
        VERBOSE_TOROUT_STRING(m);
-       *tp = kthread_run(fn, arg, "%s", s);
+       *tp = kthread_create(fn, arg, "%s", s);
        if (IS_ERR(*tp)) {
                ret = PTR_ERR(*tp);
                TOROUT_ERRSTRING(f);
                *tp = NULL;
+               return ret;
        }
+       wake_up_process(*tp);  // Process is sleeping, so ordering provided.
        torture_shuffle_task_register(*tp);
        return ret;
 }