linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Andi Kleen <ak@suse.de>
Cc: akpm@osdl.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Does shmem_getpage==>shmem_alloc_page==>alloc_page_vma hold mmap_sem?
Date: Sat, 5 Nov 2005 21:21:33 -0800	[thread overview]
Message-ID: <20051105212133.714da0d2.pj@sgi.com> (raw)

Andi,

The comment in mm/mempolicy.c for alloc_page_vma() states:

  Should be called with the mm_sem of the vma hold.

However it seems that the call chain (#ifdef CONFIG_NUMA):

  shmem_getpage ==> shmem_alloc_page ==> alloc_page_vma

where shmem_getpage() is called from many of the mm/shmem.c file
operations, is called without holding mmap_sem.  There is no
mention of mmap_sem in the entire mm/shmem.c file.

This doesn't seem right.

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

--
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:[~2005-11-06  5:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-06  5:21 Paul Jackson [this message]
2005-11-06  5:56 ` Hugh Dickins
2005-11-06  6:17   ` Paul Jackson

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=20051105212133.714da0d2.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox