Properly refcnt child processes
authorBarret Rhoden <brho@cs.berkeley.edu>
Sat, 18 Jan 2014 01:08:12 +0000 (17:08 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Sat, 18 Jan 2014 01:11:50 +0000 (17:11 -0800)
commit0545da7df1daa991ac3c40bddc44dd70a84e6c8e
treecfb419fc70604162b28c8adcf7c3cb58d9857abb
parente437f357dd8c1726041165b97046e91161da6338
Properly refcnt child processes

Parents hold a ref on their children.  We didn't incref for this.  For
forked processes, this was working, since we failed to decref.  Spawn,
which decreffed properly, blew up.

I think the ksched still had a copy of the proc, in this case, and it
tried to run it.  The kref check (can't incref when 0) caught this.
kern/src/process.c
kern/src/syscall.c