From owner-cvs-all@FreeBSD.ORG Tue Mar 30 11:02:00 2004 Return-Path: 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 5105516A4CE for ; Tue, 30 Mar 2004 11:02:00 -0800 (PST) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 1A7F543D5C for ; Tue, 30 Mar 2004 11:02:00 -0800 (PST) (envelope-from nate@root.org) Received: (qmail 81929 invoked by uid 1000); 30 Mar 2004 19:02:00 -0000 Date: Tue, 30 Mar 2004 11:02:00 -0800 (PST) From: Nate Lawson To: Robert Watson In-Reply-To: <20040329015546.85A3016A4F3@hub.freebsd.org> Message-ID: <20040330105844.B81785@root.org> References: <20040329015546.85A3016A4F3@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern sys_socket.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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, 30 Mar 2004 19:02:00 -0000 On Sun, 28 Mar 2004, Robert Watson wrote: > Modified files: > sys/kern sys_socket.c > Log: > Conditionally acquire Giant when entering the socket layer via file > descriptor operations based on debug.mpsafenet, rather than acquiring > Giant unconditionally. > > Revision Changes Path > 1.56 +6 -6 src/sys/kern/sys_socket.c This adds a small race if someone happens to disable debug.mpsafenet while a thread is holding Giant. This may not be an issue since this is only a debugging sysctl and shouldn't be changed during network operation. Still, it's important to note this. I've been finishing up ACPI locking and revisited a similar issue in the embedded controller driver. When changing use of the global lock, I acquire the outer lock so I am certain no one is holding the inner lock and neglects to release it on the way out of a function because the global lock flag changed. -Nate