mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
mm/damon/sysfs: remove region size validation
DAMON_SYSFS validates user inputs for monitoring target regions to disallow negative size regions. DAMON core assumes only positive size regions, though. The validation is incomplete. Fortunately damon_set_regions(), which is eventually used by DAMON_SYSFS, does the complete validation. Remove the incomplete and unnecessary validation. Link: https://lore.kernel.org/20260705155600.96555-9-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
c31ad3c6da
commit
d0a5d03b77
|
|
@ -1987,9 +1987,6 @@ static int damon_sysfs_set_regions(struct damon_target *t,
|
|||
struct damon_sysfs_region *sys_region =
|
||||
sysfs_regions->regions_arr[i];
|
||||
|
||||
if (sys_region->ar.start > sys_region->ar.end)
|
||||
goto out;
|
||||
|
||||
ranges[i].start = sys_region->ar.start;
|
||||
ranges[i].end = sys_region->ar.end;
|
||||
if (i == 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user