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: <YFMzoBpuzoA0EswZ@localhost.localdomain>
Date:   Thu, 18 Mar 2021 12:04:00 +0100
From:   Oscar Salvador <osalvador@...e.de>
To:     Michal Hocko <mhocko@...e.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Vlastimil Babka <vbabka@...e.cz>,
        David Hildenbrand <david@...hat.com>,
        Muchun Song <songmuchun@...edance.com>,
        Mike Kravetz <mike.kravetz@...cle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 1/5] mm,page_alloc: Bail out earlier on -ENOMEM in
 alloc_contig_migrate_range

On Wed, Mar 17, 2021 at 03:05:40PM +0100, Michal Hocko wrote:
> That being said, bailing out early makes sense to me. But now that
> you've made me look into the migrate_pages excellent error state reporting
> I suspect we have a bug here. Note the 
> "Returns the number of pages that were not migrated, or an error code."
> 
> but I do not see putback_movable_pages for ret > 0 so it seems we might
> leak some pages.

I fell for the same thing when looking at that code.
It took a while until I realized what was really going on.

> > Signed-off-by: Oscar Salvador <osalvador@...e.de>
> > Acked-by: Vlastimil Babka <vbabka@...e.cz>
> > Reviewed-by: David Hildenbrand <david@...hat.com>
> 
> The patch itself looks reasonable but make sure to mention this is mere
> cosmetic change unless there is a real problem fixed by this.
> Acked-by: Michal Hocko <mhocko@...e.com>

What about appending the following in the changelog:

"Note that this is not fixing a real issue, just a cosmetic change. Although
 we can save some cycles by backing off ealier."


-- 
Oscar Salvador
SUSE L3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ