From owner-cvs-src-old@FreeBSD.ORG Sun Aug 23 21:00:32 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 225D110656B5 for ; Sun, 23 Aug 2009 21:00:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7EC468FC1A for ; Sun, 23 Aug 2009 21:00:31 +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 n7NL0VcM038426 for ; Sun, 23 Aug 2009 21:00:31 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7NL0Vcl038423 for cvs-src-old@freebsd.org; Sun, 23 Aug 2009 21:00:31 GMT (envelope-from rwatson@repoman.freebsd.org) Message-Id: <200908232100.n7NL0Vcl038423@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rwatson@repoman.freebsd.org using -f From: Robert Watson Date: Sun, 23 Aug 2009 21:00:21 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net if_ef.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: Sun, 23 Aug 2009 21:00:32 -0000 rwatson 2009-08-23 21:00:21 UTC FreeBSD src repository Modified files: sys/net if_ef.c Log: SVN rev 196482 on 2009-08-23 21:00:21Z by rwatson Rather than using IFNET_RLOCK() when iterating over (and modifying) the ifnet list during if_ef load, directly acquire the ifnet_sxlock exclusively. That way when if_alloc() recurses the lock, it's a write recursion rather than a read->write recursion. This code structure is arguably a bug, so add a comment indicating that this is the case. Post-8.0, we should fix this, but this commit resolves panic-on-load for if_ef. Discussed with: bz, julian Reported by: phk MFC after: 3 days Revision Changes Path 1.50 +15 -2 src/sys/net/if_ef.c