Skip to contentSkip to conversation

mm/damon/core: initialize sidx in damos_trace_esz()

PATCH New SeongJae Park 1 participant 1 message Jul 5, 2025

Subsystems (2)
lore
Share & tools
lore

SeongJae Park

author maintainer
#0 lore raw

PATCH 1/1 mm/damon/core: initialize sidx in damos_trace_esz()

Commit ae4dc5a31d0f ("mm/damon: add trace event for effective size quota") introduced damos_trac_esz(), which uses sidx variable without initialization. Initialize before using it.

Fixes ae4dc5a31d0f ("mm/damon: add trace event for effective size quota") # mm-new
---
 mm/damon/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/damon/core.c +1 -1
index 6019b8ec4bba..dc0ee2dd55d3 100644
@@ -2014,7 +2014,7 @@ static void damos_set_effective_quota(struct damos_quota *quota)
 static void damos_trace_esz(struct damon_ctx *c, struct damos *s,
 		struct damos_quota *quota)
 {
-	unsigned int cidx = 0, sidx;
+	unsigned int cidx = 0, sidx = 0;
 	struct damos *siter;
 
 	damon_for_each_scheme(siter, c) {

base-commit: e8ad191fca305538cdebb3dac3f9be19cd610d38

Signature · 1 line
2.39.5