mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-11 23:14:13 +00:00
platform: be robust on IRQ creation failure
In case invalid IRQ numbers are used (255 on x86), the IRQ session creation request may be denied and the platform driver is killed because of the uncatched exception, which must be avoided. Issue #5406
This commit is contained in:
parent
91a58d3e98
commit
9239b36f05
@ -152,6 +152,7 @@ Genode::Irq_session_capability Device_component::irq(unsigned idx)
|
||||
return remapped_irq;
|
||||
};
|
||||
|
||||
try {
|
||||
_irq_registry.for_each([&] (Irq & irq)
|
||||
{
|
||||
if (irq.idx != idx)
|
||||
@ -210,6 +211,7 @@ Genode::Irq_session_capability Device_component::irq(unsigned idx)
|
||||
|
||||
cap = irq.shared ? irq.sirq->cap() : irq.irq->cap();
|
||||
});
|
||||
} catch (Service_denied) { error("irq could not be setup ", _device); }
|
||||
|
||||
return cap;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user