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
set_alarm(rmp, rmp->mp_interval[ITIMER_REAL]);
else rmp->mp_flags &= ~ALARM_ON;
+ mp = &mproc[0]; /* pretend the signal comes from PM */
+
check_sig(rmp->mp_pid, SIGALRM, FALSE /* ksig */);
}