From owner-freebsd-current Tue Jan 28 19:39:24 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 24DE037B401 for ; Tue, 28 Jan 2003 19:39:23 -0800 (PST) Received: from puffin.mail.pas.earthlink.net (puffin.mail.pas.earthlink.net [207.217.120.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC5A643E4A for ; Tue, 28 Jan 2003 19:39:22 -0800 (PST) (envelope-from tlambert2@mindspring.com) Received: from pool0052.cvx21-bradley.dialup.earthlink.net ([209.179.192.52] helo=mindspring.com) by puffin.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 18dj3y-0004yG-00; Tue, 28 Jan 2003 19:38:59 -0800 Message-ID: <3E374C81.BEFC3D48@mindspring.com> Date: Tue, 28 Jan 2003 19:37:37 -0800 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Craig Rodrigues Cc: Sean Kelly , current@freebsd.org Subject: Re: Lock order reversal References: <20030129010407.GA31592@edgemaster.zombie.org> <20030129014334.GA6954@attbi.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a46eb5c7999bca3ed3095aadd14b03d160a2d4e88014a4647c350badd9bab72f9c350badd9bab72f9c 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 Craig Rodrigues wrote: > On Tue, Jan 28, 2003 at 07:04:07PM -0600, Sean Kelly wrote: > > I just noticed this during bootup. It is repeatable. > > See: > http://news.gw.com/freebsd.current/30547 That's a "turn your head and cough" patch. It admits the code is broken, and leaves it broken. It also leaves the p->p_fd dereference for assignment unprotected, where at least with the reversal, it's protected. Probably the correct thing to do is to move the assignment out of the "if" statement, and then put a reference counter on the fdp, which, so long as you are not the sole reference, you are not allowed to delete it (similar to VREF in SVR4/Solaris). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message