summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorSJ Park <sj@kernel.org>2026-07-06 07:06:26 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-08-04 19:18:32 -0700
commitb1cc60c13be0e560ff651f23e6fea6df8822bf15 (patch)
treea35d5e3b9f66a605f62a22dfcb07515e7742c6fd /samples
parentcfd843b299298d7dff51bf86b51eee21e47796b7 (diff)
downloadlinux-stable-b1cc60c13be0e560ff651f23e6fea6df8822bf15.tar.gz
linux-stable-b1cc60c13be0e560ff651f23e6fea6df8822bf15.zip
samples/damon/prcl: do not stop DAMON for damon_call() failure
damon_call() failure was causing the context to be stopped, but asynchronously by the kdamond thread. To handle the race, the caller had to stop the context. damon_call() is updated to do the stop on its own. Remove the damon_stop() call from the damon_call() error handling. Link: https://lore.kernel.org/20260706140628.87414-12-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'samples')
-rw-r--r--samples/damon/prcl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/samples/damon/prcl.c b/samples/damon/prcl.c
index edeae145c4a8..842099bd6228 100644
--- a/samples/damon/prcl.c
+++ b/samples/damon/prcl.c
@@ -113,10 +113,8 @@ static int damon_sample_prcl_start(void)
repeat_call_control.data = ctx;
err = damon_call(ctx, &repeat_call_control);
- if (err) {
- damon_stop(&ctx, 1);
+ if (err)
damon_destroy_ctx(ctx);
- }
return err;
}