Files
linux/mm
SeongJae Park 1ba137c89f mm/damon/tests/core-kunit: handle alloc failures on damon_test_split_regions_of()
damon_test_split_regions_of() is assuming all dynamic memory allocation in
it will succeed.  Those are indeed likely in the real use cases since
those allocations are too small to fail, but theoretically those could
fail.  In the case, inappropriate memory access can happen.  Fix it by
appropriately cleanup pre-allocated memory and skip the execution of the
remaining tests in the failure cases.

Link: https://lkml.kernel.org/r/20251101182021.74868-9-sj@kernel.org
Fixes: 17ccae8bb5 ("mm/damon: add kunit tests")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: <stable@vger.kernel.org>	[5.15+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit eded254cb6)
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-08 10:17:21 +01:00
..
2025-09-21 14:22:09 -07:00
2024-11-03 01:28:06 -05:00
2025-10-03 16:42:44 -07:00
2025-10-03 16:42:43 -07:00
2025-09-21 14:21:59 -07:00
2025-09-13 16:54:58 -07:00
2025-09-13 16:55:07 -07:00
2025-08-02 12:06:09 -07:00
2025-09-13 16:54:46 -07:00
2025-09-23 14:14:16 -07:00
2024-07-10 12:14:54 -07:00
2025-09-21 14:22:28 -07:00
2026-01-02 12:56:37 +01:00
2025-09-13 16:55:07 -07:00
2025-09-13 16:55:07 -07:00
2025-09-21 14:21:59 -07:00