diff options
| author | SeongJae Park <sj@kernel.org> | 2025-10-03 23:14:54 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-10-15 23:24:33 +0300 |
| commit | f0c5118ebb0eb7e4fd6f0d2ace3315ca141b317f (patch) | |
| tree | b9cc2f0f660fa334ff3ff84a3683843aa744db86 /tools/docs/lib/parse_data_structs.py | |
| parent | c97513cddcfc235f2522617980838e500af21d01 (diff) | |
| download | linux-f0c5118ebb0eb7e4fd6f0d2ace3315ca141b317f.tar.xz | |
mm/damon/sysfs: catch commit test ctx alloc failure
Patch series "mm/damon/sysfs: fix commit test damon_ctx [de]allocation".
DAMON sysfs interface dynamically allocates and uses a damon_ctx object
for testing if given inputs for online DAMON parameters update is valid.
The object is being used without an allocation failure check, and leaked
when the test succeeds. Fix the two bugs.
This patch (of 2):
The damon_ctx for testing online DAMON parameters commit inputs is used
without its allocation failure check. This could result in an invalid
memory access. Fix it by directly returning an error when the allocation
failed.
Link: https://lkml.kernel.org/r/20251003201455.41448-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20251003201455.41448-2-sj@kernel.org
Fixes: 4c9ea539ad59 ("mm/damon/sysfs: validate user inputs from damon_sysfs_commit_input()")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org> [6.15+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/docs/lib/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions
