mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:57:45 +00:00
Kernel/VirtIO: Determine names without PCI access in IRQ context
This is a fix so the VirtIO code doesn't lead to assertion because we try to determine the name based on the PCI values of the VirtIO device, because trying to read from the PCI configuration space requires to acquire a Mutex, which fails in an IRQ context. To ensure we never encounter a situation when we call a pure virtual function in an IRQ context, let's make class_name() method to be a non-pure virtual function, so it can be still called at anytime.
This commit is contained in:
parent
ac798da642
commit
666c0c5a08
2 changed files with 6 additions and 6 deletions
|
@ -93,7 +93,7 @@ public:
|
|||
virtual void initialize();
|
||||
|
||||
protected:
|
||||
virtual StringView class_name() const = 0;
|
||||
virtual StringView class_name() const { return "VirtIO::Device"; }
|
||||
explicit Device(PCI::Address);
|
||||
struct MappedMMIO {
|
||||
OwnPtr<Memory::Region> base;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue