plan9fox/sys
cinap_lenrek f481ac716d kernel: fix alarm postnote race
when alarmkproc is commited to send the alarm note to the process,
the process might have exited already, or worse, being reused for
another process. pexit() zeros p->alarm at the beginning, but the
kalarmproc() might read p->alarm before pexit() zeroed it, decide
to send the note, then get preempted and pexit() releases the proc.
once kalarmproc() is resumed, the proc might be already something
different and we send the note to the wrong thing.

we now check p->alarm under the debug qlock. that way, pexit()
cannot make progress while we test the condition.

remove the error label arround postnote(). postnote does not raise
error.
2014-01-01 05:14:38 +01:00
..
doc /sys/doc: permissions for cleanps, mkdirlist, mkfilelist 2012-10-20 19:09:54 +02:00
games/lib fortunes: That's a video card, Blake. 2013-12-26 16:11:05 -05:00
include ape: move strdup() from libbsd to libap (from sources) 2013-12-28 05:14:10 +01:00
lib acid leak: remove arena pointer a < 0xff000000 check 2013-12-25 15:00:39 +01:00
man mothra: add regular expression text search (thanks mischief, sl) 2013-12-28 21:48:53 +01:00
src kernel: fix alarm postnote race 2014-01-01 05:14:38 +01:00