From: Michal Hocko <mhocko@kernel.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mike Kravetz <mike.kravetz@oracle.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Punit Agrawal <punit.agrawal@arm.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Andrea Arcangeli <aarcange@redhat.com>,
linux-mm@kvack.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] mm, hugetlb: Fix a double unlock bug in alloc_surplus_huge_page()
Date: Wed, 10 Jan 2018 11:14:39 +0100 [thread overview]
Message-ID: <20180110101439.GQ1732@dhcp22.suse.cz> (raw)
In-Reply-To: <20180109200559.g3iz5kvbdrz7yydp@mwanda>
On Tue 09-01-18 23:06:00, Dan Carpenter wrote:
> 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 <dan.carpenter@oracle.com>
Ups, a left over after refactoring. Andrew, could you fold this into
mm-hugetlb-further-simplify-hugetlb-allocation-api.patch please?
> 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;
>
> spin_lock(&hugetlb_lock);
> /*
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2018-01-10 10:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 20:06 [PATCH] mm, hugetlb: Fix a double unlock bug in alloc_surplus_huge_page() Dan Carpenter
2018-01-10 10:14 ` Michal Hocko [this message]
Reply instructions:
You may reply publicly 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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180110101439.GQ1732@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mike.kravetz@oracle.com \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=punit.agrawal@arm.com \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).