kernel - Add missing dsched_exit_thread() and friends
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 12 Nov 2011 06:53:58 +0000 (22:53 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 12 Nov 2011 06:53:58 +0000 (22:53 -0800)
* In the lwp_create()/lwp_fork() failure path we have to clean up
  the dsched stuff before scrapping the LWP.

Reported-by: swildner
sys/kern/kern_fork.c

index e174167..fe3c96a 100644 (file)
@@ -227,6 +227,8 @@ fail:
        lp->lwp_thread->td_flags |= TDF_EXITING;
        lwkt_remove_tdallq(lp->lwp_thread);
        PHOLD(p);
+       biosched_done(lp->lwp_thread);
+       dsched_exit_thread(lp->lwp_thread);
        lwp_dispose(lp);
        lwkt_reltoken(&p->p_token);
 fail2: