summaryrefslogtreecommitdiff
path: root/arch/csky
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2024-09-04 20:29:31 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-09-10 02:39:13 +0300
commitf0679f9e6d88ae9e84fca35ada84f5859a19b227 (patch)
tree35ebe189c1280eb8928ea3be9834eca2f32c6c90 /arch/csky
parent5ad7a998ba921e37d7e373a2d70d7da401b27f94 (diff)
downloadlinux-f0679f9e6d88ae9e84fca35ada84f5859a19b227.tar.xz
mm/damon/tests/vaddr-kunit: init maple tree without MT_FLAGS_LOCK_EXTERN
damon_test_three_regions_in_vmas() initializes a maple tree with MM_MT_FLAGS. The flags contains MT_FLAGS_LOCK_EXTERN, which means mt_lock of the maple tree will not be used. And therefore the maple tree initialization code skips initialization of the mt_lock. However, __link_vmas(), which adds vmas for test to the maple tree, uses the mt_lock. In other words, the uninitialized spinlock is used. The problem becomes clear when spinlock debugging is turned on, since it reports spinlock bad magic bug. Fix the issue by excluding MT_FLAGS_LOCK_EXTERN from the maple tree initialization flags. Note that we don't use empty flags to make it further similar to the usage of mm maple tree, and to be prepared for possible future changes, as suggested by Liam. Link: https://lkml.kernel.org/r/20240904172931.1284-1-sj@kernel.org Fixes: d0cf3dd47f0d ("damon: convert __damon_va_three_regions to use the VMA iterator") Signed-off-by: SeongJae Park <sj@kernel.org> Reported-by: Guenter Roeck <linux@roeck-us.net> Closes: https://lore.kernel.org/1453b2b2-6119-4082-ad9e-f3c5239bf87e@roeck-us.net Suggested-by: Liam R. Howlett <Liam.Howlett@oracle.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/csky')
0 files changed, 0 insertions, 0 deletions