summaryrefslogtreecommitdiff
path: root/AK/BumpAllocator.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-09-04 08:42:31 +0300
committerAndreas Kling <kling@serenityos.org>2021-09-04 16:36:02 +0200
commited6c1f53afbb6207450045b07552effa5335ceb1 (patch)
treedb576e877f69cafedd27e5da4ada89e8c531058f /AK/BumpAllocator.h
parente490c17bdedf48ea252a1f9fe04b748e63cbd9b7 (diff)
downloadserenity-ed6c1f53afbb6207450045b07552effa5335ceb1.zip
Kernel/VirtIO: Defer initialization of device out of the constructor
This ensures we safely handle interrupts (which can call virtual functions), so they don't happen in the constructor - this pattern can lead to a crash, if we are still in the constructor context because not all methods are available for usage (some are pure virtual, so it's possible to call __cxa_pure_virtual). Also, under some conditions like adding a PCI device via PCI-passthrough mechanism in QEMU, it became exposed to the eye that the code asserts on RNG::handle_device_config_change(). That device has no configuration but if the hypervisor still misbehaves and tries to configure it, we should simply return false to indicate nothing happened.
Diffstat (limited to 'AK/BumpAllocator.h')
0 files changed, 0 insertions, 0 deletions