From owner-cvs-all@FreeBSD.ORG Sun May 14 14:35:27 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52C2016A407; Sun, 14 May 2006 14:35:27 +0000 (UTC) (envelope-from bms@spc.org) Received: from mindfull.spc.org (mindfull.spc.org [83.167.185.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0F6043D46; Sun, 14 May 2006 14:35:26 +0000 (GMT) (envelope-from bms@spc.org) Received: from arginine.spc.org ([83.167.185.2]) by mindfull.spc.org with esmtps (TLSv1:AES256-SHA:256) (Exim 4.52) id 1FfHgo-00063U-Ld; Sun, 14 May 2006 15:35:22 +0100 Received: from localhost (localhost [127.0.0.1]) by arginine.spc.org (Postfix) with ESMTP id 0F32E65499; Sun, 14 May 2006 15:35:25 +0100 (BST) Received: from arginine.spc.org ([127.0.0.1]) by localhost (arginine.spc.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 17486-03; Sun, 14 May 2006 15:35:22 +0100 (BST) Received: by arginine.spc.org (Postfix, from userid 1078) id 8FEDF653F9; Sun, 14 May 2006 15:35:22 +0100 (BST) Date: Sun, 14 May 2006 15:35:22 +0100 From: Bruce M Simpson To: Bruce M Simpson Message-ID: <20060514143522.GF46921@spc.org> Mail-Followup-To: Bruce M Simpson , Bruce M Simpson , src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org References: <200605141422.k4EEMnmC056704@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200605141422.k4EEMnmC056704@repoman.freebsd.org> User-Agent: Mutt/1.4.1i Organization: Incunabulum X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - mindfull.spc.org X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - spc.org X-Source: X-Source-Args: X-Source-Dir: Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet in.h ip_output.c ip_var.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2006 14:35:27 -0000 On Sun, May 14, 2006 at 02:22:49PM +0000, Bruce M Simpson wrote: > By making the imo_membership array a dynamically allocated vector, > this minimizes disruption to existing IPv4 multicast code. This > change breaks the ABI for the kernel module ip_mroute.ko, and may > cause a small amount of churn for folks working on the IGMPv3 merge. The inpcb lock is held during re-allocation, via the use of the INP_LOCK() macro. I believe that this is enough to cover the reallocation, based on regression testing on my own SMP machine. Given that realloc(9) potentially changes the address of a previously allocated structure, locking is necessary to protect the input and output paths from the IP_ADD_MEMBERSHIP path, to prevent a race between the user adding a new group and a packet being demux'd from further down in the stack for udp or raw delivery. Regards, BMS