Without this we can have the following occur
kill(pid, foo)
queues signal processing for foo
signal(SIGFOO, SIG_IGN)
executes pending signal and jumps to lala land
-----
- [IP] Check safety of changes to allow interrupts during swapper
-- [ ] Check we don't have any races of the form
+- [x] Check we don't have any races of the form
kill()
checks signal has handler
signal(x, SIG_DFL)
signal serviced
+
+ (We now clear the cached signal in this and the mask case)
retval = (arg_t) udata.u_sigvec[sig];
if (sig != SIGKILL && sig != SIGSTOP)
udata.u_sigvec[sig] = func;
+ /* Force recalculation of signal pending in the syscall return path */
+ udata.u_cursig = 0;
irqrestore(irq);
-
+
return (retval);
nogood:
udata.u_ptab->p_held |= sigmask(sig);
else
udata.u_ptab->p_held &= ~sigmask(sig);
+ /* Force recalculation of signal pending in the syscall return path */
+ udata.u_cursig = 0;
return 0;
}