Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / kernel / locking / locktorture.c
index 1952466c7db5f338c7fc51793bee4b8f490f22a7..0955b885d0dc8eb5fe54aeeebe08c0eee6bd9cb7 100644 (file)
@@ -216,7 +216,7 @@ static int lock_torture_writer(void *arg)
        static DEFINE_TORTURE_RANDOM(rand);
 
        VERBOSE_TOROUT_STRING("lock_torture_writer task started");
-       set_user_nice(current, 19);
+       set_user_nice(current, MAX_NICE);
 
        do {
                if ((torture_random(&rand) & 0xfffff) == 0)
@@ -355,7 +355,8 @@ static int __init lock_torture_init(void)
                &lock_busted_ops, &spin_lock_ops, &spin_lock_irq_ops,
        };
 
-       torture_init_begin(torture_type, verbose, &locktorture_runnable);
+       if (!torture_init_begin(torture_type, verbose, &locktorture_runnable))
+               return -EBUSY;
 
        /* Process args and tell the world that the torturer is on the job. */
        for (i = 0; i < ARRAY_SIZE(torture_ops); i++) {