[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1e8ff9bf-c81b-9c39-9f44-2f82efcd36ec@huawei.com>
Date: Mon, 3 Jul 2023 19:27:25 +0800
From: Miaohe Lin <linmiaohe@...wei.com>
To: Naoya Horiguchi <naoya.horiguchi@...ux.dev>
CC: <akpm@...ux-foundation.org>, <naoya.horiguchi@....com>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: memory-failure: fix potential page refcnt leak in
memory_failure()
On 2023/7/3 14:37, Naoya Horiguchi wrote:
> On Sat, Jul 01, 2023 at 03:28:37PM +0800, Miaohe Lin wrote:
>> put_ref_page() is not called to drop extra refcnt when comes from madvise
>> in the case pfn is valid but pgmap is NULL leading to page refcnt leak.
>
> Is this test scenario realistic one? I don't think that we can call madvise() for
> such a device memory page. If this is the case, this issue can be thought as
> potentioal one (so no need to send to stable).
This is a theoretical problem. If pagemap can ever be NULL after page refcnt is increased, this
would occur. I think it's not needed to send to stable too.
>
>>
>> Fixes: 1e8aaedb182d ("mm,memory_failure: always pin the page in madvise_inject_error")
>> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
>
> Anyway, the patch looks good to me. Thanks you.
>
> Acked-by: Naoya Horiguchi <naoya.horiguchi@....com>
Thanks for your review and comment.
Powered by blists - more mailing lists