[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200821180931.GF6823@gaia>
Date: Fri, 21 Aug 2020 19:09:31 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Davidlohr Bueso <dave@...olabs.net>
Cc: akpm@...ux-foundation.org, oleg@...hat.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Davidlohr Bueso <dbueso@...e.de>
Subject: Re: [PATCH] mm/kmemleak: rely on rcu for task stack scanning
On Thu, Aug 20, 2020 at 01:39:02PM -0700, Davidlohr Bueso wrote:
> kmemleak_scan() currently relies on the big tasklist_lock
> hammer to stabilize iterating through the tasklist. Instead,
> this patch proposes simply using rcu along with the rcu-safe
> for_each_process_thread flavor (without changing scan semantics),
> which doesn't make use of next_thread/p->thread_group and thus
> cannot race with exit. Furthermore, any races with fork()
> and not seeing the new child should be benign as it's not
> running yet and can also be detected by the next scan.
>
> Signed-off-by: Davidlohr Bueso <dbueso@...e.de>
As long as the kernel thread stack is still around (kmemleak does use
try_get_task_stack()), I'm fine with the change:
Acked-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists