Add more KASSERT's.

This commit is contained in:
Andre Oppermann 2007-04-20 15:21:29 +00:00
parent 0d957bba48
commit 7824d002c0
2 changed files with 8 additions and 0 deletions

View File

@ -796,6 +796,9 @@ tcp_input(struct mbuf *m, int off0)
if (so->so_options & SO_ACCEPTCONN) {
struct in_conninfo inc;
KASSERT(tp->t_state == TCPS_LISTEN, ("%s: so accepting but "
"tp not listening", __func__));
bzero(&inc, sizeof(inc));
inc.inc_isipv6 = isipv6;
#ifdef INET6
@ -2519,6 +2522,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
check_delack:
KASSERT(headlocked == 0, ("%s: check_delack: head locked",
__func__));
INP_INFO_UNLOCK_ASSERT(&tcbinfo);
INP_LOCK_ASSERT(tp->t_inpcb);
if (tp->t_flags & TF_DELACK) {
tp->t_flags &= ~TF_DELACK;

View File

@ -796,6 +796,9 @@ tcp_input(struct mbuf *m, int off0)
if (so->so_options & SO_ACCEPTCONN) {
struct in_conninfo inc;
KASSERT(tp->t_state == TCPS_LISTEN, ("%s: so accepting but "
"tp not listening", __func__));
bzero(&inc, sizeof(inc));
inc.inc_isipv6 = isipv6;
#ifdef INET6
@ -2519,6 +2522,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
check_delack:
KASSERT(headlocked == 0, ("%s: check_delack: head locked",
__func__));
INP_INFO_UNLOCK_ASSERT(&tcbinfo);
INP_LOCK_ASSERT(tp->t_inpcb);
if (tp->t_flags & TF_DELACK) {
tp->t_flags &= ~TF_DELACK;