Author: mmacy Date: Thu May 24 15:28:16 2018 New Revision: 334159 URL: https://svnweb.freebsd.org/changeset/base/334159
Log: AF_UNIX: assert that we're not acquiring the same lock Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Thu May 24 15:24:42 2018 (r334158) +++ head/sys/kern/uipc_usrreq.c Thu May 24 15:28:16 2018 (r334159) @@ -344,6 +344,7 @@ unp_pcb_rele(struct unpcb *unp) static void unp_pcb_lock2(struct unpcb *unp, struct unpcb *unp2) { + MPASS(unp != unp2); UNP_PCB_UNLOCK_ASSERT(unp); UNP_PCB_UNLOCK_ASSERT(unp2); if ((uintptr_t)unp2 > (uintptr_t)unp) { @@ -375,6 +376,7 @@ unp_pcb_owned_lock2_slowpath(struct unpcb *unp, struct freed = 0; \ UNP_PCB_LOCK_ASSERT((unp)); \ UNP_PCB_UNLOCK_ASSERT((unp2)); \ + MPASS(unp != unp2); \ if (__predict_true(UNP_PCB_TRYLOCK((unp2)))) \ break; \ else if ((uintptr_t)(unp2) > (uintptr_t)(unp)) \ _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"