From: David Hildenbrand <david@redhat.com>
To: Dev Jain <dev.jain@arm.com>,
syzbot+57bcc752f0df8bb1365c@syzkaller.appspotmail.com
Cc: akpm@linux-foundation.org, jgg@ziepe.ca, jhubbard@nvidia.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
peterx@redhat.com, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] WARNING in follow_page_pte
Date: Wed, 6 Aug 2025 14:21:51 +0200 [thread overview]
Message-ID: <3d2c04e0-b164-41fb-922b-ad7c09075a62@redhat.com> (raw)
In-Reply-To: <20250806111922.669-1-dev.jain@arm.com>
> static void commit_anon_folio_batch(struct vm_area_struct *vma,
> - struct folio *folio, unsigned long addr, pte_t *ptep,
> + struct folio *folio, struct page *first_page, unsigned long addr, pte_t *ptep,
> pte_t oldpte, pte_t ptent, int nr_ptes, struct mmu_gather *tlb)
> {
> - struct page *first_page = folio_page(folio, 0);
> bool expected_anon_exclusive;
> int sub_batch_idx = 0;
> int len;
>
> while (nr_ptes) {
> - expected_anon_exclusive = PageAnonExclusive(first_page + sub_batch_idx);
> + expected_anon_exclusive = PageAnonExclusive(nth_page(first_page, sub_batch_idx));
We shouldn't need nth_page here, for the same reason we don't use it in
rmap code: we're operating within a single page table and hugetlb does
not apply.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2025-08-06 12:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-06 7:32 syzbot
2025-08-06 7:55 ` David Hildenbrand
2025-08-06 8:01 ` David Hildenbrand
2025-08-06 11:19 ` Dev Jain
2025-08-06 11:23 ` Dev Jain
2025-08-06 12:21 ` David Hildenbrand [this message]
2025-08-06 15:38 ` syzbot
2025-08-06 11:21 ` syzbot
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=3d2c04e0-b164-41fb-922b-ad7c09075a62@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dev.jain@arm.com \
--cc=jgg@ziepe.ca \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peterx@redhat.com \
--cc=syzbot+57bcc752f0df8bb1365c@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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