[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d2c04e0-b164-41fb-922b-ad7c09075a62@redhat.com>
Date: Wed, 6 Aug 2025 14:21:51 +0200
From: David Hildenbrand <david@...hat.com>
To: Dev Jain <dev.jain@....com>,
syzbot+57bcc752f0df8bb1365c@...kaller.appspotmail.com
Cc: akpm@...ux-foundation.org, jgg@...pe.ca, jhubbard@...dia.com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org, peterx@...hat.com,
syzkaller-bugs@...glegroups.com
Subject: Re: [syzbot] [mm?] WARNING in follow_page_pte
> 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
Powered by blists - more mailing lists