diff options
| author | SeongJae Park <sj@kernel.org> | 2026-03-26 17:32:22 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-04-06 11:13:42 -0700 |
| commit | 0199390a6b92fc21860e1b858abf525c7e73b956 (patch) | |
| tree | 6c59650ef4490d63f1f25a439faba53d7460bd3d /lib/raid/git@git.tavy.me:linux-stable.git | |
| parent | cece9dc61daab6006d3ac9d36a0df2dd58fef18d (diff) | |
mm/damon/sysfs: dealloc repeat_call_control if damon_call() fails
damon_call() for repeat_call_control of DAMON_SYSFS could fail if somehow
the kdamond is stopped before the damon_call(). It could happen, for
example, when te damon context was made for monitroing of a virtual
address processes, and the process is terminated immediately, before the
damon_call() invocation. In the case, the dyanmically allocated
repeat_call_control is not deallocated and leaked.
Fix the leak by deallocating the repeat_call_control under the
damon_call() failure.
This issue is discovered by sashiko [1].
Link: https://lkml.kernel.org/r/20260327003224.55752-1-sj@kernel.org
Link: https://lore.kernel.org/20260320020630.962-1-sj@kernel.org [1]
Fixes: 04a06b139ec0 ("mm/damon/sysfs: use dynamically allocated repeat mode damon_call_control")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org> [6.17+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/raid/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
