diff options
| -rw-r--r-- | sys/kern/subr_turnstile.c | 1 | ||||
| -rw-r--r-- | sys/kern/uipc_usrreq.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index c98337988731..55af7143e8ad 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -736,6 +736,7 @@ turnstile_unpend(struct turnstile *ts) td->td_lockname = NULL; TD_CLR_LOCK(td); MPASS(TD_CAN_RUN(td)); + MPASS(td->td_turnstile != NULL); setrunqueue(td); } else { td->td_flags |= TDF_TSNOBLOCK; diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 1a87d14a16a6..0af5ac875c2d 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -171,10 +171,12 @@ uipc_connect(struct socket *so, struct sockaddr *nam, struct thread *td) struct unpcb *unp = sotounpcb(so); int error; + KASSERT(td == curthread, ("uipc_connect: td != curthread")); + if (unp == NULL) return (EINVAL); UNP_LOCK(); - error = unp_connect(so, nam, curthread); + error = unp_connect(so, nam, td); UNP_UNLOCK(); return (error); } |
