linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <minchan@kernel.org>, <hannes@cmpxchg.org>, <mhocko@suse.com>,
	<hughd@google.com>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/madvise: fix potential pte_unmap_unlock pte error
Date: Tue, 19 Apr 2022 14:35:39 +0800	[thread overview]
Message-ID: <14389d75-bcc9-285a-f141-4de16fd34fac@huawei.com> (raw)
In-Reply-To: <20220418210951.b87743ae8b7c01f883e571ea@linux-foundation.org>

On 2022/4/19 12:09, Andrew Morton wrote:
> On Sat, 16 Apr 2022 16:14:16 +0800 Miaohe Lin <linmiaohe@huawei.com> wrote:
> 
>> We can't assume pte_offset_map_lock will return same orig_pte value. So
>> it's necessary to reacquire the orig_pte or pte_unmap_unlock will unmap
>> the stale pte.
> 
> hm, where did you learn this info about pte_offset_map_lock()?
> 
> I assume this is from code inspection only?  No observed runtime failures?

Yes, this is from code inspection. There is no observed runtime failures now due
to the race window being really small. And this becomes noop in !CONFIG_HIGHMEM
system (CONFIG_HIGHMEM system should be rare now). But this could be triggered theoretically.

Thanks!

> .
> 


      reply	other threads:[~2022-04-19  6:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-16  8:14 Miaohe Lin
2022-04-19  4:09 ` Andrew Morton
2022-04-19  6:35   ` Miaohe Lin [this message]

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=14389d75-bcc9-285a-f141-4de16fd34fac@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@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