On Thu, Sep 02, 2021 at 12:24:25PM -0400, Ewan D. Milne wrote: > Calling device_add() makes the scsi_disk visible in sysfs, the accessor > routines reference sdkp->disk->queue which was not yet set properly. > Fix this by initializing gendisk fields earlier in the function. What kernel is this against? This won't apply against linux-next as disk->queue is now always set up by __blk_alloc_disk.