kernel: Fix missing reference to team/thread in signal events.

The signal to the team/thread is only actually sent in a deferred
procedure. To ensure that the team/thread stays valid between the DPC
being queued and it actually running, we need to acquire a reference.

Fixes #11390, where the DPC was run after the team was already
destroyed.
This commit is contained in:
Michael Lotz
2014-10-31 16:16:37 +01:00
parent 6109f53bc6
commit 6a80e6889a
2 changed files with 34 additions and 0 deletions
+4
View File
@@ -52,6 +52,8 @@ struct TeamSignalEvent : SignalEvent {
static TeamSignalEvent* Create(Team* team, uint32 signalNumber,
int32 signalCode, int32 errorCode);
virtual status_t Fire();
protected:
virtual void DoDPC(DPCQueue* queue);
@@ -69,6 +71,8 @@ struct ThreadSignalEvent : SignalEvent {
int32 signalCode, int32 errorCode,
pid_t sendingTeam);
virtual status_t Fire();
protected:
virtual void DoDPC(DPCQueue* queue);