From owner-cvs-src-old@FreeBSD.ORG Mon Aug 31 09:44:17 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 172291065767 for ; Mon, 31 Aug 2009 09:44:17 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 78B9F8FC1A for ; Mon, 31 Aug 2009 09:44:15 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7V9iFLk058990 for ; Mon, 31 Aug 2009 09:44:15 GMT (envelope-from zec@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7V9iFGD058989 for cvs-src-old@freebsd.org; Mon, 31 Aug 2009 09:44:15 GMT (envelope-from zec@repoman.freebsd.org) Message-Id: <200908310944.n7V9iFGD058989@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to zec@repoman.freebsd.org using -f From: Marko Zec Date: Mon, 31 Aug 2009 09:44:07 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_8 Subject: cvs commit: src/sys/net vnet.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 09:44:17 -0000 zec 2009-08-31 09:44:07 UTC FreeBSD src repository Modified files: (Branch: RELENG_8) sys/net vnet.c Log: SVN rev 196690 on 2009-08-31 09:44:07Z by zec MFC r196633: Introduce a separate sx lock for protecting lists of vnet sysinit and sysuninit handlers. Previously, sx_vnet, which is a lock designated for protecting the vnet list, was (ab)used for protecting vnet sysinit / sysuninit handler lists as well. Holding exclusively the sx_vnet lock while invoking sysinit and / or sysuninit handlers turned out to be problematic, since some of the handlers may attempt to wake up another thread and wait for it to walk over the vnet list, hence acquire a shared lock on sx_vnet, which in turn leads to a deadlock. Protecting vnet sysinit / sysuninit lists with a separate lock mitigates this issue, which was first observed with flowtable_flush() / flowtable_cleaner() in sys/net/flowtable.c. Reviewed by: rwatson, jhb MFC after: 3 days Approved by: re (rwatson) Revision Changes Path 1.8.2.3 +26 -20 src/sys/net/vnet.c