summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2022-11-22 22:48:31 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-12-01 01:49:41 +0300
commit95bc35f9bee5220dad4e8567654ab3288a181639 (patch)
tree7fc2cb9389cc4ac5815d4d20ed1807640d84d002 /arch/x86
parenta435874bf626f55d7147026b059008c8de89fbb8 (diff)
downloadlinux-95bc35f9bee5220dad4e8567654ab3288a181639.tar.xz
mm/damon/sysfs: fix wrong empty schemes assumption under online tuning in damon_sysfs_set_schemes()
Commit da87878010e5 ("mm/damon/sysfs: support online inputs update") made 'damon_sysfs_set_schemes()' to be called for running DAMON context, which could have schemes. In the case, DAMON sysfs interface is supposed to update, remove, or add schemes to reflect the sysfs files. However, the code is assuming the DAMON context wouldn't have schemes at all, and therefore creates and adds new schemes. As a result, the code doesn't work as intended for online schemes tuning and could have more than expected memory footprint. The schemes are all in the DAMON context, so it doesn't leak the memory, though. Remove the wrong asssumption (the DAMON context wouldn't have schemes) in 'damon_sysfs_set_schemes()' to fix the bug. Link: https://lkml.kernel.org/r/20221122194831.3472-1-sj@kernel.org Fixes: da87878010e5 ("mm/damon/sysfs: support online inputs update") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> [5.19+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions