Linux-mm Archive on
 help / color / Atom feed
From: Dan Carpenter <>
To: Andrew Morton <>,
	Michal Hocko <>
Cc: Mike Kravetz <>,
	Naoya Horiguchi <>,
	Stephen Rothwell <>,
	Punit Agrawal <>,
	"Aneesh Kumar K.V" <>,
	Andrea Arcangeli <>,,
Subject: [PATCH] mm, hugetlb: Fix a double unlock bug in alloc_surplus_huge_page()
Date: Tue, 9 Jan 2018 23:06:00 +0300
Message-ID: <20180109200559.g3iz5kvbdrz7yydp@mwanda> (raw)

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 <>

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index ffcae114ceed..742a929f2311 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -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;

To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to  For more info on Linux MM,
see: .
Don't email: <a href=mailto:""> </a>

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09 20:06 Dan Carpenter [this message]
2018-01-10 10:14 ` Michal Hocko

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180109200559.g3iz5kvbdrz7yydp@mwanda \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-mm Archive on

Archives are clonable:
	git clone --mirror linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ \
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone