From owner-freebsd-current Fri Jan 3 15: 1:57 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 982BA37B401 for ; Fri, 3 Jan 2003 15:01:56 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 478A643EE1 for ; Fri, 3 Jan 2003 15:01:52 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 99935 invoked by uid 1000); 3 Jan 2003 23:01:53 -0000 Date: Fri, 3 Jan 2003 15:01:53 -0800 (PST) From: Nate Lawson To: current@freebsd.org Cc: net@freebsd.org Subject: Proper -current if_attach locking? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I was looking into some "could sleep messages" and found some bogus locking in the attach routine of many drivers. Several init a mtx in their softc and then lock/unlock it in their attach routine. This, of course, does nothing to provide exclusive access to a device. I assume there is going to be a global IF_LOCK or something to be used in attach routines. Can someone fill me in on the intended design? -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message