Patch "Revert "cgroup: Fix memory leak caused by missing cgroup_bpf_offline"" has been added to the 5.15-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

    Revert "cgroup: Fix memory leak caused by missing cgroup_bpf_offline"

to the 5.15-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:
     revert-cgroup-fix-memory-leak-caused-by-missing-cgro.patch
and it can be found in the queue-5.15 subdirectory.

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



commit c7ea01ed88722d7ec3468621f807c57b4588bf1a
Author: Chen Ridong <chenridong@xxxxxxxxxx>
Date:   Fri Oct 18 08:15:19 2024 +0000

    Revert "cgroup: Fix memory leak caused by missing cgroup_bpf_offline"
    
    [ Upstream commit feb301c60970bd2a1310a53ce2d6e4375397a51b ]
    
    This reverts commit 04f8ef5643bcd8bcde25dfdebef998aea480b2ba.
    
    Only cgroup v2 can be attached by cgroup by BPF programs. Revert this
    commit and cgroup_bpf_inherit and cgroup_bpf_offline won't be called in
    cgroup v1. The memory leak issue will be fixed with next patch.
    
    Fixes: 04f8ef5643bc ("cgroup: Fix memory leak caused by missing cgroup_bpf_offline")
    Link: https://lore.kernel.org/cgroups/aka2hk5jsel5zomucpwlxsej6iwnfw4qu5jkrmjhyfhesjlfdw@46zxhg5bdnr7/
    Signed-off-by: Chen Ridong <chenridong@xxxxxxxxxx>
    Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 9ba87c5de1a87..7346197f464cb 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2228,10 +2228,8 @@ static void cgroup_kill_sb(struct super_block *sb)
 	 * And don't kill the default root.
 	 */
 	if (list_empty(&root->cgrp.self.children) && root != &cgrp_dfl_root &&
-	    !percpu_ref_is_dying(&root->cgrp.self.refcnt)) {
-		cgroup_bpf_offline(&root->cgrp);
+	    !percpu_ref_is_dying(&root->cgrp.self.refcnt))
 		percpu_ref_kill(&root->cgrp.self.refcnt);
-	}
 	cgroup_put(&root->cgrp);
 	kernfs_kill_sb(sb);
 }




[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