diff options
author | SeongJae Park <sj@kernel.org> | 2022-11-14 17:55:52 +0000 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-11-22 18:50:42 -0800 |
commit | 8468b486612c808c9e337708d66a435498f1735c (patch) | |
tree | 28702650357ce373cd400e4180f4a4c27cc34d4b /mm/damon/ops-common.c | |
parent | 4a955bed882e734807024afd8f53213d4c61ff97 (diff) | |
download | linux-8468b486612c808c9e337708d66a435498f1735c.tar.bz2 |
mm/damon/sysfs-schemes: skip stats update if the scheme directory is removed
A DAMON sysfs interface user can start DAMON with a scheme, remove the
sysfs directory for the scheme, and then ask update of the scheme's stats.
Because the schemes stats update logic isn't aware of the situation, it
results in an invalid memory access. Fix the bug by checking if the
scheme sysfs directory exists.
Link: https://lkml.kernel.org/r/20221114175552.1951-1-sj@kernel.org
Fixes: 0ac32b8affb5 ("mm/damon/sysfs: support DAMOS stats")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org> [v5.18]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon/ops-common.c')
0 files changed, 0 insertions, 0 deletions