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: <8093D190-00C7-43A7-B63E-E06A80D20094@lca.pw>
Date:   Tue, 14 Jan 2020 20:38:39 -0500
From:   Qian Cai <cai@....pw>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Michal Hocko <mhocko@...nel.org>,
        David Hildenbrand <david@...hat.com>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        pmladek@...e.com, rostedt@...dmis.org, peterz@...radead.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] mm/hotplug: silence a lockdep splat with printk()



> On Jan 14, 2020, at 8:19 PM, Andrew Morton <akpm@...ux-foundation.org> wrote:
> 
> On Tue, 14 Jan 2020 20:02:31 -0500 Qian Cai <cai@....pw> wrote:
> 
>> 
>> 
>>>> @@ -8290,8 +8290,10 @@ bool has_unmovable_pages(struct zone *zo
>>>> 	return false;
>>>> unmovable:
>>>> 	WARN_ON_ONCE(zone_idx(zone) == ZONE_MOVABLE);
>>>> -	if (flags & REPORT_FAILURE)
>>>> -		dump_page(pfn_to_page(pfn + iter), reason);
>>>> +	if (flags & REPORT_FAILURE) {
>>>> +		page = pfn_to_page(pfn + iter);
>>> 
>>> This statement appears to be unnecessary.
>> 
>> dump_page() in set_migratetype_isolate() needs that “page”.
> 
> local var `page' is never used after this statement.
> 

The goal is to reuse the parameter of has_unmovable_pages((…, page, …)
as a return value, so after it returns, dump_page(page, ...) could use it. I
don’t see where it was defined as a local variable.

This is probably a bit too hacky, so I’ll change has_unmovable_pages()
to either return "struct page *” or NULL which is easier to understand.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ