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: <20253c7b-fdf9-47db-a388-ab34b8658a2a@huawei.com>
Date: Fri, 7 Jun 2024 12:38:32 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: Miaohe Lin <linmiaohe@...wei.com>
CC: <nao.horiguchi@...il.com>, <linux-mm@...ck.org>,
	<linux-kernel@...r.kernel.org>, <linux-edac@...r.kernel.org>,
	<akpm@...ux-foundation.org>, <tony.luck@...el.com>, <bp@...en8.de>
Subject: Re: [PATCH v2 01/13] mm/memory-failure: simplify put_ref_page()



On 2024/6/7 11:28, Miaohe Lin wrote:
> On 2024/6/6 14:46, Kefeng Wang wrote:
>>
>>
>> On 2024/6/6 14:32, Miaohe Lin wrote:
>>> Remove unneeded page != NULL check. pfn_to_page() won't return NULL.
>>> No functional change intended.
>>>
>>> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
>>> ---
>>>    mm/memory-failure.c | 6 +-----
>>>    1 file changed, 1 insertion(+), 5 deletions(-)
>>>
>>> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
>>> index f679b579d45d..2e6038c73119 100644
>>> --- a/mm/memory-failure.c
>>> +++ b/mm/memory-failure.c
>>> @@ -2120,14 +2120,10 @@ static inline unsigned long folio_free_raw_hwp(struct folio *folio, bool flag)
>>>    /* Drop the extra refcount in case we come from madvise() */
>>>    static void put_ref_page(unsigned long pfn, int flags)
>>
>> Since all calllers have a valid page,better to pass the page instead of pfn?
> 
> Seems not. put_ref_page() called above memory_failure_dev_pagemap() seems don't have a valid page yet.
> Also page might be NULL when calling put_ref_page() in soft_offline_page(). So it should be better to
> still pass pfn. Or am I miss something?

Yes, missing it, please ignore it
> 
> Thanks.
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ