Date: Sat, 06 Dec 2003 18:05:52 -0800 From: Peter Wemm <peter@wemm.org> To: Mike Silbersack <silby@silby.com> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_mmap.c Message-ID: <20031207020552.E909B2A7EA@canning.wemm.org> In-Reply-To: <20031206005341.D33930@odysseus.silby.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Mike Silbersack wrote:
>
> WHOOOOOOOOOOO HOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
>
> I'm not sure if any has realized it yet, but I think that this may be our
> first actual deadlock condition. This means that we're actually locking
> things!
Heh, I can add a few deadlocks too if that'll get some more cheers :-)
> Congrats,
>
> Mike "Silby" Silbersack
>
>
> On Fri, 5 Dec 2003, Alan Cox wrote:
>
> > alc 2003/12/05 21:45:32 PST
> >
> > FreeBSD src repository
> >
> > Modified files:
> > sys/vm vm_mmap.c
> > Log:
> > Fix a deadlock between vm_fault() and vm_mmap(): The expected lock orderi
ng
> > between vm_map and vnode locks is that vm_map locks are acquired first.
In
> > revision 1.150 mmap(2) was changed to pass a locked vnode into vm_mmap().
> > This creates a lock-order reversal when vm_mmap() calls one of the vm_map
> > routines that acquires a vm_map lock. The solution implemented herein is
> > to release the vnode lock in mmap() before calling vm_mmap() and reacquir
e
> > this lock if necessary in vm_mmap().
> >
> > Approved by: re (scottl)
> > Reviewed by: jeff, kan, rwatson
> >
> > Revision Changes Path
> > 1.174 +13 -4 src/sys/vm/vm_mmap.c
> >
>
Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031207020552.E909B2A7EA>
