race conditions in swapin/swapout
David Laight <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.smp |
|---|---|
| Message-ID | <[email protected]> |
Now I'm not sure if the 'biglock' stops these, but I noticed that the process swapping code (ie un-wire U area) in uvm/uvm_glue.c seems capable of some rather nasty actions, including: - swapping the current process - playing with zombies (and maybe invalid proc structures) IMHO the following changes need to be made: - put all of the code that looks at proc structures inside the proclist_lock_read() proclist_unlock_read() pair. (at least until P_INMEM is set) - don't swap if p->p_stat == SONPROC - recheck the process state after grabbing SCHED_LOCK. Fixes aren't hard... David -- David Laight: [email protected]