mm-damon-schemes-add-the-validity-judgment-of-thresholds.patch removed from -mm tree
The patch titled
Subject: mm/damon/schemes: add the validity judgment of thresholds
has been removed from the -mm tree. Its filename was
mm-damon-schemes-add-the-validity-judgment-of-thresholds.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Xin Hao <[email protected]>
Subject: mm/damon/schemes: add the validity judgment of thresholds
In dbgfs "schemes" interface, i do some test like this:
# cd /sys/kernel/debug/damon
# echo "2 1 2 1 10 1 3 10 1 1 1 1 1 1 1 1 2 3" > schemes
# cat schemes
# 2 1 2 1 10 1 3 10 1 1 1 1 1 1 1 1 2 3 0 0There have some unreasonable places, i set the valules of these variables "<min_sz, max_sz> <min_nr_a, max_nr_a>, <min_age, max_age>, <wmarks.high, wmarks.mid, wmarks.low>" as "<2, 1>, <2, 1>, <10, 1>, <1, 2, 3>.
So there add a validity judgment for these thresholds value.
---
mm/damon/dbgfs.c | 7 +++++++ 1 file changed, 7 insertions(+)
mm/damon/dbgfs.c renamed from mm/damon/dbgfs.c~mm-damon-schemes-add-the-validity-judgment-of-thresholds +7 -0
@@ -213,6 +213,13 @@ static struct damos **str_to_schemes(conif (!damos_action_valid (action)) goto fail; +if (min_sz > max_sz || min_nr_a > max_nr_a || min_age > max_age) + goto fail; + +if (wmarks.high < wmarks.mid || wmarks.high < wmarks.low || + wmarks.mid < wmarks.low) + goto fail; + pos += parsed; scheme =damon_new_scheme (min_sz, max_sz, min_nr_a, max_nr_a, min_age, max_age, action, "a, &wmarks);
_
Patches currently in -mm which might be from [email protected] are