public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Tosatti <marcelo@kvack.org>
To: Izik Eidus <izike@qumranet.com>
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 15:08:12 -0200	[thread overview]
Message-ID: <20080211170812.GA13173@dmt> (raw)
In-Reply-To: <47B065EA.7010805@qumranet.com>

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.

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.

Other than that looks good.


-------------------------------------------------------------------------
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:08 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 [this message]
2008-02-11 17:26   ` Izik Eidus

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=20080211170812.GA13173@dmt \
    --to=marcelo@kvack.org \
    --cc=avi@qumranet.com \
    --cc=izike@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox