From owner-cvs-all@FreeBSD.ORG Tue Sep 9 10:09:36 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D3CD1065678; Tue, 9 Sep 2008 10:09:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5406A8FC2A; Tue, 9 Sep 2008 10:09:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id C8B5A46C06; Tue, 9 Sep 2008 06:09:33 -0400 (EDT) Date: Tue, 9 Sep 2008 11:09:34 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200809082140.m88LeNJW085481@repoman.freebsd.org> Message-ID: References: <200809082140.m88LeNJW085481@repoman.freebsd.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern subr_turnstile.c 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: Tue, 09 Sep 2008 10:09:36 -0000 On Mon, 8 Sep 2008, John Baldwin wrote: > SVN rev 182879 on 2008-09-08 21:40:15Z by jhb > > - Reduce scope of #ifdef's in uma_zcreate() call in init_turnstile0(). > - Set UMA_ZONE_NOFREE so that the per-turnstile spin locks are type stable > to avoid a race where one thread might dereference a lock in a free'd > turnstile that was previously used by another thread. Is this a feature or a workaround for a bug? Normally in the above scenario we would consider use-after-free a bug or symptom of a larger architectural problem rather than a feature. At least, that's what I consider similar use of UMA_ZONE_NOFREE where it persists in the network stack :-). Robert N M Watson Computer Laboratory University of Cambridge