linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Simon Jeons <simon.jeons@gmail.com>
To: Michel Lespinasse <walken@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Rik van Riel <riel@redhat.com>,
	Hugh Dickins <hughd@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: protect against concurrent vma expansion
Date: Thu, 03 Jan 2013 18:40:05 -0600	[thread overview]
Message-ID: <1357260005.4930.6.camel@kernel.cn.ibm.com> (raw)
In-Reply-To: <CANN689FoSGMUi0mC6dzXe5tXo-BL_4eFZ1NF-De38x8mNhPXcg@mail.gmail.com>

On Wed, 2012-12-19 at 19:01 -0800, Michel Lespinasse wrote:
> Hi Simon,
> 
> On Wed, Dec 19, 2012 at 5:56 PM, Simon Jeons <simon.jeons@gmail.com> wrote:
> > One question.
> >
> > I found that mainly callsite of expand_stack() is #PF, but it holds
> > mmap_sem each time before call expand_stack(), how can hold a *shared*
> > mmap_sem happen?
> 
> the #PF handler calls down_read(&mm->mmap_sem) before calling expand_stack.
> 
> I think I'm just confusing you with my terminology; shared lock ==
> read lock == several readers might hold it at once (I'd say they share
> it)

Sorry for my late response. 

Since expand_stack() will modify vma, then why hold a read lock here?

> 


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-01-04  0:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-01  6:56 [PATCH] mm: protect against concurrent vma expansion Michel Lespinasse
2012-12-03 23:01 ` Andrew Morton
2012-12-04  0:35   ` Michel Lespinasse
2012-12-04  0:43     ` Andrew Morton
2012-12-04 14:48       ` Michel Lespinasse
2012-12-20  1:56         ` Simon Jeons
2012-12-20  3:01           ` Michel Lespinasse
2013-01-04  0:40             ` Simon Jeons [this message]
2013-01-04  0:50               ` Michel Lespinasse
2013-01-04  1:18                 ` Simon Jeons
2013-01-04  2:49               ` Al Viro

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=1357260005.4930.6.camel@kernel.cn.ibm.com \
    --to=simon.jeons@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@redhat.com \
    --cc=walken@google.com \
    /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;
as well as URLs for NNTP newsgroup(s).