Date: Thu, 24 May 2018 15:28:17 +0000 (UTC) From: Matt Macy <mmacy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334159 - head/sys/kern Message-ID: <201805241528.w4OFSHIE035106@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805241528.w4OFSHIE035106>