rcu: Eliminate BUG_ON() for kernel/rcu/update.c
[platform/kernel/linux-rpi.git] / kernel / rcu / update.c
index f203b94..cb26de2 100644 (file)
@@ -822,7 +822,8 @@ static int __init rcu_spawn_tasks_kthread(void)
        struct task_struct *t;
 
        t = kthread_run(rcu_tasks_kthread, NULL, "rcu_tasks_kthread");
-       BUG_ON(IS_ERR(t));
+       if (WARN_ONCE(IS_ERR(t), "%s: Could not start Tasks-RCU grace-period kthread, OOM is now expected behavior\n", __func__))
+               return 0;
        smp_mb(); /* Ensure others see full kthread. */
        WRITE_ONCE(rcu_tasks_kthread_ptr, t);
        return 0;