Kernel: Fix KUBSAN crash with RamdiskDevice

This commit is contained in:
Jean-Baptiste Boric 2021-04-06 17:24:47 +02:00 committed by Andreas Kling
parent a7ad0f14bf
commit 436ca2491d
Notes: sideshowbarker 2024-07-18 20:43:30 +09:00

View file

@ -38,7 +38,7 @@ NonnullRefPtr<RamdiskDevice> RamdiskDevice::create(const RamdiskController& cont
}
RamdiskDevice::RamdiskDevice(const RamdiskController& controller, OwnPtr<Region>&& region, int major, int minor)
: StorageDevice(controller, major, minor, 512, m_region->size() / 512)
: StorageDevice(controller, major, minor, 512, region->size() / 512)
, m_region(move(region))
{
dmesgln("Ramdisk: Device #{} @ {}, Capacity={}", minor, m_region->vaddr(), max_addressable_block() * 512);