mm, hugetlb: Fix a double unlock bug in alloc_surplus_huge_page()
Subsystems (3)
PATCH 1/1 mm, hugetlb: Fix a double unlock bug in alloc_surplus_huge_page()
We aren't holding the hugetlb_lock so there is no need to unlock.
Fixes b27f11e5e675 ("mm, hugetlb: get rid of surplus page accounting tricks")
Signed-off-by Dan Carpenter <[email protected]>
mm/hugetlb.c +1 -1
@@ -1567,7 +1567,7 @@ static struct page *alloc_surplus_huge_page(struct hstate *h, gfp_t gfp_mask, page =alloc_fresh_huge_page (h, gfp_mask, nid, nmask);if (!page) - goto out_unlock; +return NULL ;spin_lock (&hugetlb_lock);/*
Quoted 4 lines · Dan Carpenter
We aren't holding the
hugetlb_lockso there is no need to unlock.Fixes b27f11e5e675 ("mm, hugetlb: get rid of surplus page accounting tricks")Signed-off-by Dan Carpenter <[email protected]>
Ups, a left over after refactoring. Andrew, could you fold this into mm-hugetlb-further-simplify-hugetlb-allocation-api.patch please?
Quoted 13 lines
mm/hugetlb.c +1
-1@@ -1567,7 +1567,7 @@ static struct page *alloc_surplus_huge_page(struct hstate *h, gfp_t gfp_mask, page =alloc_fresh_huge_page (h, gfp_mask, nid, nmask);if (!page) - goto out_unlock; +return NULL ;spin_lock (&hugetlb_lock);/*
Signature · 2 lines
Michal Hocko SUSE Labs