lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMZfGtVKgfc7Gxf_07038SOJKDbi--9u0Jhwk7fTdrpkXu0m_Q@mail.gmail.com>
Date:   Thu, 20 May 2021 13:13:05 +0800
From:   Muchun Song <songmuchun@...edance.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Oscar Salvador <osalvador@...e.de>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Michal Hocko <mhocko@...e.com>,
        David Hildenbrand <david@...hat.com>,
        Matthew Wilcox <willy@...radead.org>,
        Linux Memory Management List <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Xiongchun duan <duanxiongchun@...edance.com>,
        zhengqi.arch@...edance.com, fam.zheng@...edance.com,
        Anshuman Khandual <anshuman.khandual@....com>
Subject: Re: [External] Re: [PATCH] mm: migrate: fix missing update
 page_private to hugetlb_page_subpool

On Thu, May 20, 2021 at 12:24 PM Andrew Morton
<akpm@...ux-foundation.org> wrote:
>
> On Thu, 20 May 2021 10:59:49 +0800 Muchun Song <songmuchun@...edance.com> wrote:
>
> > Since commit d6995da31122 ("hugetlb: use page.private for hugetlb specific
> > page flags") converts page.private for hugetlb specific page flags. We
> > should use hugetlb_page_subpool() to get the subpool pointer instead of
> > page_private(). The commit forgot to update it in the page migration
> > routine. So fix it.
> >
> > ...
> >
> > --- a/mm/migrate.c
> > +++ b/mm/migrate.c
> > @@ -1290,7 +1290,7 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
> >        * page_mapping() set, hugetlbfs specific move page routine will not
> >        * be called and we could leak usage counts for subpools.
> >        */
> > -     if (page_private(hpage) && !page_mapping(hpage)) {
> > +     if (hugetlb_page_subpool(hpage) && !page_mapping(hpage)) {
> >               rc = -EBUSY;
> >               goto out_unlock;
> >       }
>
> So it uses the wrong page*, so this isn't just a cosmetic fix.  One
> cannot tell from this changelog.
>
> Please describe the runtime effects of this bug.  Please always include
> this information when fixing bugs.  And when adding them.

OK. I should update the commit log in the next version.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ