From 674240e02039a6feb14e2496e939c6cb80df9341 Mon Sep 17 00:00:00 2001 From: glebius Date: Mon, 11 Aug 2014 15:06:07 +0000 Subject: Move KASSERT into locked region. Submitted by: kib --- sys/kern/subr_sfbuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/subr_sfbuf.c b/sys/kern/subr_sfbuf.c index cdf19da..707ace2 100644 --- a/sys/kern/subr_sfbuf.c +++ b/sys/kern/subr_sfbuf.c @@ -209,9 +209,8 @@ sf_buf_ref(struct sf_buf *sf) return; #endif - KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf)); - mtx_lock(&sf_buf_lock); + KASSERT(sf->ref_count > 0, ("%s: sf %p not allocated", __func__, sf)); sf->ref_count++; mtx_unlock(&sf_buf_lock); } -- cgit v1.1