All of lore.kernel.org
 help / color / mirror / Atom feed
From: Izik Eidus <izike@qumranet.com>
To: Marcelo Tosatti <marcelo@kvack.org>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>,
	Avi Kivity <avi@qumranet.com>
Subject: Re: [PATCH] replace the slots lock from the mmap_sem to private kvm lock
Date: Mon, 11 Feb 2008 19:26:15 +0200	[thread overview]
Message-ID: <47B08537.5000802@qumranet.com> (raw)
In-Reply-To: <20080211170812.GA13173@dmt>

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/

      reply	other threads:[~2008-02-11 17:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 15:12 [PATCH] replace the slots lock from the mmap_sem to private kvm lock Izik Eidus
2008-02-11 17:08 ` Marcelo Tosatti
2008-02-11 17:26   ` Izik Eidus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47B08537.5000802@qumranet.com \
    --to=izike@qumranet.com \
    --cc=avi@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=marcelo@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.