Date: Tue, 17 Jun 2003 15:02:31 -0700 From: Alfred Perlstein <alfred@FreeBSD.org> To: Don Lewis <truckman@FreeBSD.org> Cc: current@FreeBSD.org Subject: Re: Giant pushdown in kern_descrip.c rev 1.128 Message-ID: <20030617220231.GV62025@elvis.mu.org> In-Reply-To: <200306172006.h5HK6lM7052632@gw.catspoiler.org> References: <20030617190735.GU62025@elvis.mu.org> <200306172006.h5HK6lM7052632@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Don Lewis <truckman@FreeBSD.org> [030617 13:06] wrote: > On 17 Jun, Alfred Perlstein wrote: > > * Don Lewis <truckman@FreeBSD.org> [030617 12:00] wrote: > >> It's not legal to attempt to aquire Giant in fdrop_locked(), while > >> FILE_LOCK() is held. The problem is that FILE_LOCK uses the mutex pool, > >> which should only be used for leaf mutexes. > >> > >> It also looks like there is a potential for a lock order reversal if > >> some callers aquire Giant before FILE_LOCK() and fdrop_locked() does the > >> opposite. > >> > >> It also appears that witness ignores the mutex pool ... > > > > Yes, but I think the fix is as simple as just dropping the FILE_LOCK > > after the decrement as we're the last holders of it, can you try > > this: > > I like simple fixes, especially when the code shrinks ;-) > > Unfortunately, I think your point about this only happening because this > process is the last holder of the file means that this doesn't explain > Peter's deadlock. You can still deadlock because another file's mutex may hash to the same location.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030617220231.GV62025>