From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: 'Catalin Marinas' <catalin.marinas@arm.com>, linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org,
'Andrew Morton' <akpm@linux-foundation.org>,
'Andy Lutomirski' <luto@kernel.org>,
'CAI Qian' <caiqian@redhat.com>
Subject: Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning
Date: Wed, 12 Oct 2016 18:16:46 +0800 [thread overview]
Message-ID: <00ca01d22471$bcef4ef0$36cdecd0$@alibaba-inc.com> (raw)
In-Reply-To: <1476266223-14325-1-git-send-email-catalin.marinas@arm.com>
> @@ -1453,8 +1453,11 @@ static void kmemleak_scan(void)
>
> read_lock(&tasklist_lock);
> do_each_thread(g, p) {
Take a look at this commit please.
1da4db0cd5 ("oom_kill: change oom_kill.c to use for_each_thread()")
> - scan_block(task_stack_page(p), task_stack_page(p) +
> - THREAD_SIZE, NULL);
> + 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);
> }
>
--
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>
next prev parent reply other threads:[~2016-10-12 10:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-12 9:57 Catalin Marinas
2016-10-12 10:16 ` Hillf Danton [this message]
2016-10-12 10:47 ` Catalin Marinas
2016-10-12 10:41 ` Michal Hocko
2016-10-12 15:54 ` CAI Qian
2016-10-12 16:14 ` Catalin Marinas
2016-10-19 18:33 ` Andrew Morton
2016-10-20 10:02 ` 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='00ca01d22471$bcef4ef0$36cdecd0$@alibaba-inc.com' \
--to=hillf.zj@alibaba-inc.com \
--cc=akpm@linux-foundation.org \
--cc=caiqian@redhat.com \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.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