Patch "rcutorture: Properly set rcu_fwds for OOM handling" has been added to the 5.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

    rcutorture: Properly set rcu_fwds for OOM handling

to the 5.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:
     rcutorture-properly-set-rcu_fwds-for-oom-handling.patch
and it can be found in the queue-5.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 d6b758e57e523d867dfdfdf8d6f34a201f220830
Author: Paul E. McKenney <paulmck@xxxxxxxxxx>
Date:   Sun Jul 19 14:40:31 2020 -0700

    rcutorture: Properly set rcu_fwds for OOM handling
    
    [ Upstream commit c8fa63714763b7795a3f5fb7ed6d000763e6dccc ]
    
    The conversion of rcu_fwds to dynamic allocation failed to actually
    allocate the required structure.  This commit therefore allocates it,
    frees it, and updates rcu_fwds accordingly.  While in the area, it
    abstracts the cleanup actions into rcu_torture_fwd_prog_cleanup().
    
    Fixes: 5155be9994e5 ("rcutorture: Dynamically allocate rcu_fwds structure")
    Reported-by: kernel test robot <rong.a.chen@xxxxxxxxx>
    Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index efb792e13fca9..23ec68d8ff3aa 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -2154,9 +2154,20 @@ static int __init rcu_torture_fwd_prog_init(void)
 		return -ENOMEM;
 	spin_lock_init(&rfp->rcu_fwd_lock);
 	rfp->rcu_fwd_cb_tail = &rfp->rcu_fwd_cb_head;
+	rcu_fwds = rfp;
 	return torture_create_kthread(rcu_torture_fwd_prog, rfp, fwd_prog_task);
 }
 
+static void rcu_torture_fwd_prog_cleanup(void)
+{
+	struct rcu_fwd *rfp;
+
+	torture_stop_kthread(rcu_torture_fwd_prog, fwd_prog_task);
+	rfp = rcu_fwds;
+	rcu_fwds = NULL;
+	kfree(rfp);
+}
+
 /* Callback function for RCU barrier testing. */
 static void rcu_torture_barrier_cbf(struct rcu_head *rcu)
 {
@@ -2360,7 +2371,7 @@ rcu_torture_cleanup(void)
 
 	show_rcu_gp_kthreads();
 	rcu_torture_barrier_cleanup();
-	torture_stop_kthread(rcu_torture_fwd_prog, fwd_prog_task);
+	rcu_torture_fwd_prog_cleanup();
 	torture_stop_kthread(rcu_torture_stall, stall_task);
 	torture_stop_kthread(rcu_torture_writer, writer_task);
 



[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