lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251111154838.0951555906fa923ec642cfd4@linux-foundation.org>
Date: Tue, 11 Nov 2025 15:48:38 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: David Hildenbrand <david@...hat.com>
Cc: Manish Kumar <manish1588@...il.com>, vbabka@...e.cz, surenb@...gle.com,
 mhocko@...e.com, jackmanb@...gle.com, hannes@...xchg.org, ziy@...dia.com,
 linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/page_isolation: clarify FIXME around shrink_slab()
 in memory hotplug

On Mon, 20 Oct 2025 21:26:42 +0200 David Hildenbrand <david@...hat.com> wrote:

> On 15.10.25 19:50, Manish Kumar wrote:
> > The existing FIXME comment notes that memory hotplug doesn't invoke
> > shrink_slab() directly. This patch adds context explaining that this is
> > an intentional design choice to avoid recursion or deadlocks in the
> > memory reclaim path, as slab shrinking is handled by vmscan.
> > 
> > Signed-off-by: Manish Kumar <manish1588@...il.com>
> > ---
> >   mm/page_isolation.c | 10 ++++++++--
> >   1 file changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/mm/page_isolation.c b/mm/page_isolation.c
> > index b2fc5266e3d2..2ca20c3f0a97 100644
> > --- a/mm/page_isolation.c
> > +++ b/mm/page_isolation.c
> > @@ -176,10 +176,16 @@ static int set_migratetype_isolate(struct page *page, int migratetype, int isol_
> >   
> >   	/*
> >   	 * FIXME: Now, memory hotplug doesn't call shrink_slab() by itself.
> > -	 * We just check MOVABLE pages.
> > +	 *
> > +	 * This is an intentional limitation: invoking shrink_slab() from a
> > +	 * hotplug path can cause reclaim recursion or deadlock if the normal
> > +	 * memory reclaim (vmscan) path is already active. Slab shrinking is
> > +	 * handled by the vmscan reclaim code under normal operation, so hotplug
> > +	 * avoids direct calls into shrink_slab() to prevent reentrancy issues.
> 
> This is the first time I hear about this reentrance issue.
> 
> How did you come up with this explanation?
> 

-ETIMEDOUT, I'll drop this patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ