Re: [PATCH V4 2/9] null_blk: register configfs subsystem after creating default devices

From: Nilay Shroff

Date: Fri Jul 10 2026 - 08:39:03 EST


On 7/9/26 3:34 PM, Zizhi Wo wrote:
In null_init(), configfs_register_subsystem() currently runs before
register_blkdev(), so when null_blk is built as a module, a racing mkdir()
+ poweron from userspace can reach null_add_dev() while null_major is still
0. __add_disk() then hits WARN_ON(disk->minors) (major=0 with minors!=0)
and fails:

Looks good to me.

Reviewed-by: Nilay Shroff <nilay@xxxxxxxxxxxxx>