From: Oleg Nesterov <oleg@redhat.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: akpm@linux-foundation.org, catalin.marinas@arm.com,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH] mm/kmemleak: rely on rcu for task stack scanning
Date: Fri, 21 Aug 2020 13:20:41 +0200 [thread overview]
Message-ID: <20200821112041.GH4546@redhat.com> (raw)
In-Reply-To: <20200820203902.11308-1-dave@stgolabs.net>
On 08/20, Davidlohr Bueso wrote:
>
> @@ -1471,15 +1471,15 @@ static void kmemleak_scan(void)
> if (kmemleak_stack_scan) {
> struct task_struct *p, *g;
>
> - read_lock(&tasklist_lock);
> - do_each_thread(g, p) {
> + rcu_read_lock();
> + for_each_process_thread(g, p) {
> void *stack = try_get_task_stack(p);
> if (stack) {
> scan_block(stack, stack + THREAD_SIZE, NULL);
> put_task_stack(p);
> }
> - } while_each_thread(g, p);
> - read_unlock(&tasklist_lock);
> + }
> + rcu_read_unlock();
Acked-by: Oleg Nesterov <oleg@redhat.com>
next prev parent reply other threads:[~2020-08-21 11:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 20:39 Davidlohr Bueso
[not found] ` <20200821002554.GB4622@lca.pw>
2020-08-21 1:27 ` Davidlohr Bueso
2020-08-21 11:20 ` Oleg Nesterov [this message]
2020-08-21 18:09 ` Catalin Marinas
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=20200821112041.GH4546@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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