diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2022-07-09 17:26:29 +0800 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-07-18 15:07:52 -0700 |
commit | da9a298f5fad0dc615079a340da42928bc5b138e (patch) | |
tree | df3eca8f7d0b0237fd1b3b45d3425acfe85baaee /fs/ocfs2/slot_map.c | |
parent | bdeb77bc2c405fa9f954c20269db175a0bd2793f (diff) | |
download | lwn-da9a298f5fad0dc615079a340da42928bc5b138e.tar.gz lwn-da9a298f5fad0dc615079a340da42928bc5b138e.zip |
hugetlb: fix memoryleak in hugetlb_mcopy_atomic_pte
When alloc_huge_page fails, *pagep is set to NULL without put_page first.
So the hugepage indicated by *pagep is leaked.
Link: https://lkml.kernel.org/r/20220709092629.54291-1-linmiaohe@huawei.com
Fixes: 8cc5fcbb5be8 ("mm, hugetlb: fix racy resv_huge_pages underflow on UFFDIO_COPY")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Acked-by: Muchun Song <songmuchun@bytedance.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/slot_map.c')
0 files changed, 0 insertions, 0 deletions