linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hugh Dickins <hughd@google.com>
To: Peter Xu <peterx@redhat.com>
Cc: Hugh Dickins <hughd@google.com>,
	Yuanzheng Song <songyuanzheng@huawei.com>,
	 akpm@linux-foundation.org, gregkh@linuxfoundation.org,
	david@redhat.com,  linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH STABLE 5.10] mm/memory: add non-anonymous page check in the copy_present_page()
Date: Thu, 27 Oct 2022 18:32:01 -0700 (PDT)	[thread overview]
Message-ID: <432c4428-b6d4-f93-266-b920a854c3c@google.com> (raw)
In-Reply-To: <Y1sMk30wS+1uH/hc@x1n>

Reinstating Cc stable, which I removed just before the discussion settled.

On Thu, 27 Oct 2022, Peter Xu wrote:
> ...
> 
> After a re-read and 2nd thought, I think David has a valid point in that we
> shouldn't have special handling of !anon pages on CoW during fork(),
> because that seems to be against the fundamental concept of fork().
> 
> So now I think I agree the !Anon original check does look a bit cleaner,
> and also make fork() behavior matching with the old/new kernels, irrelevant
> of the pin mess.

Thanks Peter.  So Yuanzheng's patch for 5.10 is exactly right.

Sorry for leading everyone astray: my mistake was to suppose that
its !PageAnon check was simply to avoid the later BUG_ON(!anon_vma):
whereas David and Peter now agree that it actually corrects the
semantics for fork() on file pages.

I lift my hold on Yuanzheng's patch: nobody actually said "Acked-by",
but I think the discussion and resolution have given better than that.
(No 3rd thoughts please!)

Hugh


  reply	other threads:[~2022-10-28  1:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24  9:49 Yuanzheng Song
2022-10-26 16:52 ` Greg KH
2022-10-27 11:37   ` songyuanzheng
2022-10-26 21:51 ` Hugh Dickins
2022-10-27  0:32   ` Peter Xu
2022-10-27  1:48     ` Hugh Dickins
2022-10-27  2:11       ` songyuanzheng
2022-10-27 15:01       ` Peter Xu
2022-10-27 21:58         ` Hugh Dickins
2022-10-27 22:56           ` Peter Xu
2022-10-28  1:32             ` Hugh Dickins [this message]
2022-10-28  4:26               ` David Hildenbrand
2022-10-28 14:39               ` Peter Xu
2022-10-27  7:54   ` David Hildenbrand
2022-10-27 11:55   ` songyuanzheng

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=432c4428-b6d4-f93-266-b920a854c3c@google.com \
    --to=hughd@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=peterx@redhat.com \
    --cc=songyuanzheng@huawei.com \
    --cc=stable@vger.kernel.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