From owner-cvs-src-old@FreeBSD.ORG Thu Apr 23 13:08:58 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 AF0791065767 for ; Thu, 23 Apr 2009 13:08:58 +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 9BB8B8FC26 for ; Thu, 23 Apr 2009 13:08:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n3ND8wxg006848 for ; Thu, 23 Apr 2009 13:08:58 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n3ND8weG006847 for cvs-src-old@freebsd.org; Thu, 23 Apr 2009 13:08:58 GMT (envelope-from rwatson@repoman.freebsd.org) Message-Id: <200904231308.n3ND8weG006847@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rwatson@repoman.freebsd.org using -f From: Robert Watson Date: Thu, 23 Apr 2009 13:08:47 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net if.c if_var.h 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: Thu, 23 Apr 2009 13:08:59 -0000 rwatson 2009-04-23 13:08:47 UTC FreeBSD src repository Modified files: sys/net if.c if_var.h Log: SVN rev 191423 on 2009-04-23 13:08:47Z by rwatson Add ifunit_ref(), a version of ifunit(), that returns not just an interface pointer, but also a reference to it. Modify ifioctl() to use ifunit_ref(), holding the reference until all ioctls, etc, have completed. This closes a class of reader-writer races in which interfaces could be removed during long-running ioctls, leading to crashes. Many other consumers of ifunit() should now use ifunit_ref() to avoid similar races. MFC after: 3 weeks Revision Changes Path 1.325 +28 -6 src/sys/net/if.c 1.137 +1 -0 src/sys/net/if_var.h