Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2003 19:37:37 -0800
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Craig Rodrigues <rodrigc@attbi.com>
Cc:        Sean Kelly <smkelly@zombie.org>, current@freebsd.org
Subject:   Re: Lock order reversal
Message-ID:  <3E374C81.BEFC3D48@mindspring.com>
References:  <20030129010407.GA31592@edgemaster.zombie.org> <20030129014334.GA6954@attbi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E374C81.BEFC3D48>