summaryrefslogtreecommitdiff
path: root/sys/kern/kern_xxx.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-11-29 23:12:31 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-11-29 23:12:31 +0000
commite54f442105ee2dd1c3bd2b954328a6e8969922dd (patch)
tree2be82d2447a340f2e786b05364cd8f96cc9a7a9b /sys/kern/kern_xxx.c
parenta703e29b473dc139dbf1f2624dac6abea5cd10d0 (diff)
Backout previous commit. There is a possible race which makes it possible
for sys_reboot() to hang forever.
Diffstat (limited to 'sys/kern/kern_xxx.c')
-rw-r--r--sys/kern/kern_xxx.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c
index a842462a218..654ed83dc4f 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_xxx.c,v 1.13 2009/11/25 11:01:14 kettenis Exp $ */
+/* $OpenBSD: kern_xxx.c,v 1.14 2009/11/29 23:12:30 kettenis Exp $ */
/* $NetBSD: kern_xxx.c,v 1.32 1996/04/22 01:38:41 christos Exp $ */
/*
@@ -53,7 +53,7 @@ sys_reboot(struct proc *p, void *v, register_t *retval)
} */ *uap = v;
CPU_INFO_ITERATOR cii;
struct cpu_info *ci;
- int error, s;
+ int error;
if ((error = suser(p, 0)) != 0)
return (error);
@@ -68,23 +68,6 @@ sys_reboot(struct proc *p, void *v, register_t *retval)
}
}
- /*
- * Make sure we stop the secondary CPUs.
- */
- s = splstatclock();
- CPU_INFO_FOREACH(cii, ci) {
- if (CPU_IS_PRIMARY(ci))
- continue;
- ci->ci_schedstate.spc_schedflags |= SPCF_SHOULDHALT;
- }
- CPU_INFO_FOREACH(cii, ci) {
- if (CPU_IS_PRIMARY(ci))
- continue;
- while ((ci->ci_schedstate.spc_schedflags & SPCF_HALTED) == 0)
- tsleep(&ci->ci_schedstate, PZERO, "schedstate", 0);
- }
- splx(s);
-
if_downall();
boot(SCARG(uap, opt));