Commit 5a3e902f authored by Jing-Ting Wu's avatar Jing-Ting Wu Committed by Treehugger Robot
Browse files

FROMLIST: cgroup: Fix race condition at rebind_subsystems()



Root cause:
The rebind_subsystems() is no lock held when move css object from A
list to B list,then let B's head be treated as css node at
list_for_each_entry_rcu().

Solution:
Add grace period before invalidating the removed rstat_css_node.

Bug: 236944947
Change-Id: I3bb9577525c7e2a1f4dce4a0b9c84a28e74c2f11
Reported-by: default avatarJing-Ting Wu <jing-ting.wu@mediatek.com>
Suggested-by: default avatarMichal Koutný <mkoutny@suse.com>
Signed-off-by: default avatarJing-Ting Wu <jing-ting.wu@mediatek.com>
Tested-by: default avatarJing-Ting Wu <jing-ting.wu@mediatek.com>
Link: https://lore.kernel.org/linux-arm-kernel/20220823054148.29346-1-Jing-Ting.Wu@mediatek.com/


Signed-off-by: default avatarJing-Ting Wu <Jing-Ting.Wu@mediatek.com>
parent 6aafd4a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment