public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: "Yin, Fengwei" <fengwei.yin@intel.com>
To: David Hildenbrand <david@redhat.com>,
	Ryan Roberts <ryan.roberts@arm.com>,
	syzbot <syzbot+50ef73537bbc393a25bb@syzkaller.appspotmail.com>,
	<akpm@linux-foundation.org>, <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>, <syzkaller-bugs@googlegroups.com>,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [syzbot] [mm?] WARNING in __folio_rmap_sanity_checks
Date: Sat, 6 Jan 2024 12:36:13 +0800	[thread overview]
Message-ID: <e98fd1bc-ab6a-4f6f-a2f3-29b68fa5b15f@intel.com> (raw)
In-Reply-To: <d08a3e17-ea4d-40e4-b36c-031bf1f2a0a0@redhat.com>



On 1/5/2024 11:45 PM, David Hildenbrand wrote:
>>> vm_normal_page() works on these mappings, so we'd also have to skip rmap
>>> code when unmapping these pages etc. Maybe that's the whole reason we
>>> have the rmap handling here: to not special-case the unmap path.
>>
>> vm_insert_page() will set VM_MIXEDMAP and vm_normal_page() will skip
>> the page if CONFIG_ARCH_HAS_PTE_SPECIAL is enabled (it's enabled for
>> x86).  So the unmap path will skip these kind of folios?
> 
> I think we run into the
>      if (likely(!pte_special(pte)))
>          goto check_pfn;
> 
> first and return these folios. That also matches the comment of 
> vm_normal_page: "VM_MIXEDMAP mappings can likewise contain memory with 
> or without ... _all_ pages with a struct page (that is, those where 
> pfn_valid is true) are refcounted and considered normal pages by the VM."
Oh. Yes. This is the path. Thanks a lot for pointing it out to me.


Regards
Yin, Fengwei


  reply	other threads:[~2024-01-06  4:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03 11:48 [syzbot] [mm?] WARNING in __folio_rmap_sanity_checks syzbot
2024-01-03 12:13 ` David Hildenbrand
2024-01-03 14:16   ` Yin, Fengwei
2024-01-04 21:36     ` David Hildenbrand
2024-01-05  2:20       ` Yin Fengwei
2024-01-05  8:14         ` Ryan Roberts
2024-01-05  8:41           ` Yin Fengwei
2024-01-05  8:56           ` David Hildenbrand
2024-01-05 10:25             ` Ryan Roberts
2024-01-05 16:05               ` David Hildenbrand
2024-01-05 14:48             ` Yin, Fengwei
2024-01-05 15:45               ` David Hildenbrand
2024-01-06  4:36                 ` Yin, Fengwei [this message]
2024-01-05 17:04     ` Andrew Morton
2024-01-05 17:16       ` David Hildenbrand

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=e98fd1bc-ab6a-4f6f-a2f3-29b68fa5b15f@intel.com \
    --to=fengwei.yin@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryan.roberts@arm.com \
    --cc=syzbot+50ef73537bbc393a25bb@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.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