summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 71a4c78fc4a..cd5f36f6378 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.199 2017/09/27 05:43:55 guenther Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.200 2017/09/27 06:45:00 deraadt Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -128,8 +128,10 @@ sys___tfork(struct proc *p, void *v, register_t *retval)
if (KTRPOINT(p, KTR_STRUCT))
ktrstruct(p, "tfork", &param, sizeof(param));
#endif
+#ifdef TCB_INVALID
if (TCB_INVALID(param.tf_tcb))
return EINVAL;
+#endif /* TCB_INVALID */
return thread_fork(p, param.tf_stack, param.tf_tcb, param.tf_tid,
retval);