Commit 306a6db1 authored by Zeng Heng's avatar Zeng Heng
Browse files

arm64/mpam: Fix use-after-free when deleting resource groups

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I97KAV



--------------------------------

Refer to the below commit:

commit b8511ccc ("x86/resctrl: Fix use-after-free when deleting resource groups")

Before removing rdtgroup, we need to refer to waitcount counter, otherwise
when unmounting the resctrl file system or deleting ctrl_mon groups, and
there were a waiter on resctrl system, then a use-after-free issue would
occurs. Fix that by removing rdtgroup after checking the waitcount.

Fixes: 3b856c03b36a ("arm64/mpam: remove kernfs_get() calls() and add kernfs_put() calls to prevent refcount leak")
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 2ad5d68f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment