From owner-cvs-src@FreeBSD.ORG Wed Aug 9 15:04:39 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 354A916A4DD; Wed, 9 Aug 2006 15:04:39 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7841C43D77; Wed, 9 Aug 2006 15:04:31 +0000 (GMT) (envelope-from yar@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k79F4VIu063268; Wed, 9 Aug 2006 15:04:31 GMT (envelope-from yar@repoman.freebsd.org) Received: (from yar@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k79F4VkC063267; Wed, 9 Aug 2006 15:04:31 GMT (envelope-from yar) Message-Id: <200608091504.k79F4VkC063267@repoman.freebsd.org> From: Yar Tikhiy Date: Wed, 9 Aug 2006 15:04:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_6 Cc: Subject: cvs commit: src/sys/net if_vlan.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Aug 2006 15:04:39 -0000 yar 2006-08-09 15:04:30 UTC FreeBSD src repository Modified files: (Branch: RELENG_6) sys/net if_vlan.c Log: Destroy the cloned interfaces before, not after, detaching from the cloner structure in the module unload handler. The cloner structure was likely to be destroyed on detachment, which led to panic later, when its destroyed mutex was locked or whatever. It was just another "use after free" case. Now it is theoretically possible to create a vlan interface in between the loop over the interfaces and the call to if_clone_detach(). We have to live with it in 6-STABLE. In CURRENT, the actions are serialized properly in if_clone_detach(): remove cloner from the global list, destroy the cloned interfaces on it, detach from the cloner. This fix doesn't apply to HEAD, in which all the work is done by if_clone_detach(), so it goes immediately to RELENG_6. Revision Changes Path 1.79.2.11 +3 -3 src/sys/net/if_vlan.c