Files
linux/mm/damon
SeongJae Park 2949282938 mm/damon/reclaim: schedule 'damon_reclaim_timer' only after 'system_wq' is initialized
Commit 059342d1dd ("mm/damon/reclaim: fix the timer always stays
active") made DAMON_RECLAIM's 'enabled' parameter store callback,
'enabled_store()', to schedule 'damon_reclaim_timer'.  The scheduling uses
'system_wq', which is initialized in 'workqueue_init_early()'.  As kernel
parameters parsing function ('parse_args()') is called before
'workqueue_init_early()', 'enabled_store()' can be executed before
'workqueue_init_early()' and end up accessing the uninitialized
'system_wq'.  As a result, the booting hang[1].  This commit fixes the
issue by checking if the initialization is done before scheduling the
timer.

[1] https://lkml.kernel.org/[email protected]/

Link: https://lkml.kernel.org/r/[email protected]
Fixes: 059342d1dd ("mm/damon/reclaim: fix the timer always stays active")
Signed-off-by: SeongJae Park <[email protected]>
Reported-by: Greg White <[email protected]>
Cc: Hailong Tu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
2022-06-16 19:11:30 -07:00
..
2022-05-19 14:08:55 -07:00
2022-05-19 14:08:55 -07:00
2022-05-19 14:08:55 -07:00