udp: Add NOTINHASH assertion to udp_inswildcardhash()
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 3 Oct 2014 12:44:12 +0000 (20:44 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Fri, 3 Oct 2014 12:44:12 +0000 (20:44 +0800)
So that we could catch programming bugs earlier.

sys/netinet/udp_usrreq.c

index 5ff19a1..13399bf 100644 (file)
@@ -1387,6 +1387,8 @@ udp_inswildcardhash(struct inpcb *inp, struct netmsg_base *msg, int error)
        lwkt_msg_t lmsg = &msg->lmsg;
        int cpu;
 
+       ASSERT_INP_NOTINHASH(inp);
+
        /* This inpcb could no longer be directly detached */
        inp->inp_flags &= ~INP_DIRECT_DETACH;