linuxulator - Acquire MPLOCK for ksignal
authorAlex Hornung <ahornung@gmail.com>
Sun, 15 Aug 2010 10:09:26 +0000 (11:09 +0100)
committerAlex Hornung <ahornung@gmail.com>
Sun, 15 Aug 2010 10:09:26 +0000 (11:09 +0100)
* Don't forget to acquire mplock for ksignal, or otherwise we'll get a
  panic (MP_LOCK_HELD: Not held thread foo).

sys/emulation/linux/i386/linux_machdep.c

index dad054f..782d15b 100644 (file)
@@ -424,7 +424,9 @@ sys_linux_exit_group(struct linux_exit_group_args *args)
                if ((e->flags & EMUL_DIDKILL) == 0) {
                        e->flags |= EMUL_DIDKILL;
                        KKASSERT(pfind(e->proc->p_pid) == e->proc);
+                       get_mplock();
                        ksignal(e->proc, SIGKILL);
+                       rel_mplock();
                }
        }