Skip to content

Commit

Permalink
Add block devices after LKL is started
Browse files Browse the repository at this point in the history
Call add_all_disks() after lkl_start_kernel() to fix crash on new
LKL versions.
  • Loading branch information
atrosinenko committed Nov 26, 2023
1 parent f218b82 commit c1c66da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/common/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,11 @@ void kernel_boot(struct fuzzer_state *state, const char *cmdline)
abort();
}
#ifdef USE_LKL
add_all_disks(state);
lkl_host_ops.print = my_printk;
lkl_host_ops.panic = abort;
lkl_init(&lkl_host_ops);
lkl_start_kernel(cmdline);
add_all_disks(state);
lkl_mount_fs("sysfs");
lkl_mount_fs("proc");
blockdev_init_after_boot(state);
Expand Down

0 comments on commit c1c66da

Please sign in to comment.