mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-18 17:00:26 +00:00
signal: prevent submission of contexts w/o receiver
This prevents a sporadic null-pointer dereference in the nic_loopback test, which occurred once in 100 runs. I'm not sure if there's still a race window (we may investigate) with context dissolve.
This commit is contained in:
parent
b84a47b4db
commit
2a698ffd5f
@ -269,9 +269,13 @@ void Signal_receiver::dispatch_signals(Signal_source *signal_source)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* construct and locally submit signal object */
|
||||
Signal::Data signal(context, source_signal.num());
|
||||
context->_receiver->local_submit(signal);
|
||||
if (context->_receiver) {
|
||||
/* construct and locally submit signal object */
|
||||
Signal::Data signal(context, source_signal.num());
|
||||
context->_receiver->local_submit(signal);
|
||||
} else {
|
||||
PWRN("signal context with no receiver");
|
||||
}
|
||||
|
||||
/* free context lock that was taken by 'test_and_lock' */
|
||||
context->_lock.unlock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user