From mboxrd@z Thu Jan 1 00:00:00 1970 From: Izik Eidus Subject: Re: [PATCH] replace the slots lock from the mmap_sem to private kvm lock Date: Mon, 11 Feb 2008 19:26:15 +0200 Message-ID: <47B08537.5000802@qumranet.com> References: <47B065EA.7010805@qumranet.com> <20080211170812.GA13173@dmt> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Avi Kivity To: Marcelo Tosatti Return-path: In-Reply-To: <20080211170812.GA13173@dmt> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Marcelo Tosatti wrote: > On Mon, Feb 11, 2008 at 05:12:42PM +0200, Izik Eidus wrote: > >> right now kvm take the down_read(mmap_sem) lock to make sure that no >> slots will be >> removed while trying to get them / make the dirty log safe, >> but in some cases when the down_read(mmap_sem) is called and after that >> kvm_read_guest() is called >> copy_from_user can result in a page fault that will lead to recursivly >> taking the mmap_sem, >> >> this patch remove the mmap_sem, with new kvm private lock. >> > > Hi Izik, > > do_mmap/do_munmap requires the mmap_sem in write-mode. > right, i missed it > I couldnt find any sequence which grabs mmap_sem and then slots_lock, > but it would be nice to verify again that can't happen. > sure > Other than that looks good. > > thanks -- woof. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/