linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Charan Teja Reddy <quic_charante@quicinc.com>
Cc: akpm@linux-foundation.org, minchan@kernel.org, surenb@google.com,
	vbabka@suse.cz, rientjes@google.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/madvise: elevate page refcount while isolating in process_madvise()
Date: Wed, 15 Dec 2021 13:55:35 +0000	[thread overview]
Message-ID: <Ybnz1+Ljn38cZAlA@casper.infradead.org> (raw)
In-Reply-To: <1639571019-30043-1-git-send-email-quic_charante@quicinc.com>

On Wed, Dec 15, 2021 at 05:53:39PM +0530, Charan Teja Reddy wrote:
> The documentation of isolate_lru_page() says that, "it must be called
> with an elevated refcount on the page", which is not followed while
> isolating pages in process_madvise() system call with advise
> MADV_PAGEOUT. Fix it.

We hold the mmap_lock over the call to this function, so the reference
to the page from the page tables cannot go away.  There's no need to
grab an extra reference here.



  reply	other threads:[~2021-12-15 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 12:23 Charan Teja Reddy
2021-12-15 13:55 ` Matthew Wilcox [this message]
2021-12-15 15:39   ` Charan Teja Kalla

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=Ybnz1+Ljn38cZAlA@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=quic_charante@quicinc.com \
    --cc=rientjes@google.com \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    /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