diff options
| author | Sang-Heon Jeon <ekffu200098@gmail.com> | 2026-11-06 01:01:58 +0900 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-11-17 21:40:01 -0800 |
| commit | 27538caf7f72ce93be9c352148dba4f2274cf300 (patch) | |
| tree | 8351e00fccdae7db688ca3472397a4fdbd425a26 /kernel/debug | |
| parent | fffc86cbe3ebfd7fea3937f8698e4322b3137984 (diff) | |
fault-inject: fix boot failure with fault injection boot parameters
Since commit e9bc360b105c ("fault-inject: use prandom where
cryptographically secure randomness is not needed"), setup_fault_attr()
calls prandom_init_once(), which calls kmalloc() and schedule_work().
But setup_fault_attr() can be called from __setup handlers before slab and
workqueues are initialized, so any fault injection boot parameter leads to
boot failure.
So use DO_ONCE_LITE() instead.
Link: https://lore.kernel.org/20261105160209.1504867-1-ekffu200098@gmail.com
Fixes: e9bc360b105c ("fault-inject: use prandom where cryptographically secure randomness is not needed")
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: <stable@vger.kernel.org>
lib/fault-inject.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Diffstat (limited to 'kernel/debug')
0 files changed, 0 insertions, 0 deletions
