PM: fix alarm signal delivery

As of change git-87c599d, when processing CLOCK notifications, PM no
longer set the current process pointer 'mp'.  That pointer is however
used when delivering signals through check_sig(), to see whether the
current process may deliver a signal to the target process.  As a
result, delivering SIGALARM signals used a previous pointer in these
checks, causing alarm signals not to be delivered in some cases.
This patch ensures that alarm signals are again delivered with PM as
current process.

Change-Id: I94ccbe8b71289df0e1d6d67928e55297bbc28360
This commit is contained in:
David van Moolenbroek 2016-10-22 11:46:28 +00:00
parent dd41186aac
commit 286d266fd0

View File

@ -338,5 +338,7 @@ cause_sigalrm(int arg)
set_alarm(rmp, rmp->mp_interval[ITIMER_REAL]); set_alarm(rmp, rmp->mp_interval[ITIMER_REAL]);
else rmp->mp_flags &= ~ALARM_ON; else rmp->mp_flags &= ~ALARM_ON;
mp = &mproc[0]; /* pretend the signal comes from PM */
check_sig(rmp->mp_pid, SIGALRM, FALSE /* ksig */); check_sig(rmp->mp_pid, SIGALRM, FALSE /* ksig */);
} }