Patch "rcu/exp: Fix RCU expedited parallel grace period kworker allocation failure recovery" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    rcu/exp: Fix RCU expedited parallel grace period kworker allocation failure recovery

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rcu-exp-fix-rcu-expedited-parallel-grace-period-kwor.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 7e451bf9f4ee02b215a867155bbf0491eb3ab452
Author: Frederic Weisbecker <frederic@xxxxxxxxxx>
Date:   Fri Jan 12 16:46:15 2024 +0100

    rcu/exp: Fix RCU expedited parallel grace period kworker allocation failure recovery
    
    [ Upstream commit a636c5e6f8fc34be520277e69c7c6ee1d4fc1d17 ]
    
    Under CONFIG_RCU_EXP_KTHREAD=y, the nodes initialization for expedited
    grace periods is queued to a kworker. However if the allocation of that
    kworker failed, the nodes initialization is performed synchronously by
    the caller instead.
    
    Now the check for kworker initialization failure relies on the kworker
    pointer to be NULL while its value might actually encapsulate an
    allocation failure error.
    
    Make sure to handle this case.
    
    Reviewed-by: Kalesh Singh <kaleshsingh@xxxxxxxxxx>
    Fixes: 9621fbee44df ("rcu: Move expedited grace period (GP) work to RT kthread_worker")
    Signed-off-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
    Reviewed-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Boqun Feng <boqun.feng@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index b2bccfd37c383..38c86f2c040b5 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -4749,6 +4749,7 @@ static void __init rcu_start_exp_gp_kworkers(void)
 	rcu_exp_par_gp_kworker = kthread_create_worker(0, par_gp_kworker_name);
 	if (IS_ERR_OR_NULL(rcu_exp_par_gp_kworker)) {
 		pr_err("Failed to create %s!\n", par_gp_kworker_name);
+		rcu_exp_par_gp_kworker = NULL;
 		kthread_destroy_worker(rcu_exp_gp_kworker);
 		return;
 	}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux