linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Suren Baghdasaryan <surenb@google.com>
Cc: akpm@linux-foundation.org, mhocko@kernel.org, mhocko@suse.com,
	rientjes@google.com, hannes@cmpxchg.org, guro@fb.com,
	riel@surriel.com, minchan@kernel.org, kirill@shutemov.name,
	aarcange@redhat.com, christian@brauner.io, hch@infradead.org,
	oleg@redhat.com, david@redhat.com, jannh@google.com,
	shakeelb@google.com, luto@kernel.org,
	christian.brauner@ubuntu.com, fweimer@redhat.com,
	jengelh@inai.de, timmurray@google.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, kernel-team@android.com
Subject: Re: [PATCH v3 1/2] mm: protect free_pgtables with mmap_lock write lock in exit_mmap
Date: Tue, 7 Dec 2021 22:07:16 +0000	[thread overview]
Message-ID: <Ya/bFLcnqyvlVzuO@casper.infradead.org> (raw)
In-Reply-To: <20211207215031.2251719-1-surenb@google.com>

On Tue, Dec 07, 2021 at 01:50:30PM -0800, Suren Baghdasaryan wrote:
> - Added a comment for vm_operations_struct::close, documenting restriction for
> taking mmap_lock in the callback, per Michal Hocko and Matthew Wilcox

This should be a separate patch because it stands alone, but ...

>  struct vm_operations_struct {
>  	void (*open)(struct vm_area_struct * area);
> +    /*
> +     * Called with mmap_lock lock held for write from __split_vma and
> +     * remove_vma, therefore should never take that lock.
> +     */

Your whitespace indentation is weird.  And it'd be nice to make this a
kernel-doc comment (I know none of the others are, but that should be
fixed too).  And naming the functions that call it is wrong too.

	/**
	 * @close: Called when the VMA is being removed from the MM.
	 * Context: Caller holds mmap_lock.
	 */


  parent reply	other threads:[~2021-12-07 22:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 21:50 [PATCH v3 1/2] mm: protect free_pgtables with mmap_lock write lock in exit_mmap Suren Baghdasaryan
2021-12-07 21:50 ` [PATCH v3 2/2] mm/oom_kill: allow process_mrelease to run under mmap_lock protection Suren Baghdasaryan
2021-12-07 22:07 ` Matthew Wilcox [this message]
2021-12-07 22:47   ` [PATCH v3 1/2] mm: protect free_pgtables with mmap_lock write lock in exit_mmap Suren Baghdasaryan
2021-12-07 23:08     ` Suren Baghdasaryan
2021-12-08  8:56       ` Michal Hocko
2021-12-08 15:01       ` Matthew Wilcox
2021-12-08 15:51         ` Michal Hocko
2021-12-08 16:05           ` Matthew Wilcox
2021-12-08 16:50             ` Suren Baghdasaryan
2021-12-08 19:13               ` Suren Baghdasaryan
2021-12-08 19:22                 ` Matthew Wilcox
2021-12-08 21:24                   ` Suren Baghdasaryan

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=Ya/bFLcnqyvlVzuO@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.brauner@ubuntu.com \
    --cc=christian@brauner.io \
    --cc=david@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=hch@infradead.org \
    --cc=jannh@google.com \
    --cc=jengelh@inai.de \
    --cc=kernel-team@android.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=oleg@redhat.com \
    --cc=riel@surriel.com \
    --cc=rientjes@google.com \
    --cc=shakeelb@google.com \
    --cc=surenb@google.com \
    --cc=timmurray@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).