diff options
author | SeongJae Park <sj@kernel.org> | 2025-09-21 10:11:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-25 11:16:53 +0200 |
commit | 1338fb5d576a22c44e45b43428d4efb954861da2 (patch) | |
tree | d01a022310300875cfabd0bf3f7c77bb3b6da1e6 /Documentation/DocBook/procfs_example.c | |
parent | 941452199941d912b59a19f975d28d9c113bc7eb (diff) |
samples/damon/prcl: fix boot time enable crash
[ Upstream commit 2780505ec2b42c07853b34640bc63279ac2bb53b ]
If 'enable' parameter of the 'prcl' DAMON sample module is set at boot
time via the kernel command line, memory allocation is tried before the
slab is initialized. As a result kernel NULL pointer dereference BUG can
happen. Fix it by checking the initialization status.
Link: https://lkml.kernel.org/r/20250706193207.39810-3-sj@kernel.org
Fixes: 2aca254620a8 ("samples/damon: introduce a skeleton of a smaple DAMON module for proactive reclamation")
Signed-off-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: c62cff40481c ("samples/damon/mtier: avoid starting DAMON before initialization")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/DocBook/procfs_example.c')
0 files changed, 0 insertions, 0 deletions