[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZmoElLHB4BAOXD7c@localhost.localdomain>
Date: Wed, 12 Jun 2024 22:27:00 +0200
From: Oscar Salvador <osalvador@...e.de>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Muchun Song <muchun.song@...ux.dev>,
Vishal Moola <vishal.moola@...il.com>
Subject: Re: [PATCH] mm/hugetlb: Move vmf_anon_prepare upfront in hugetlb_wp
On Tue, May 21, 2024 at 09:34:46AM +0200, Oscar Salvador wrote:
> hugetlb_wp calls vmf_anon_prepare() after having allocated a page, which
> means that we might need to call restore_reserve_on_error() upon error.
> vmf_anon_prepare() releases the vma lock before returning, but
> restore_reserve_on_error() expects the vma lock to be held by the caller.
>
> Fix it by calling vmf_anon_prepare() before allocating the page.
>
> Signed-off-by: Oscar Salvador <osalvador@...e.de>
> Fixes: 9acad7ba3e25 ("hugetlb: use vmf_anon_prepare() instead of anon_vma_prepare()")
Let me just revamp this and run away
--
Oscar Salvador
SUSE Labs
Powered by blists - more mailing lists