[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00ca01d22471$bcef4ef0$36cdecd0$@alibaba-inc.com>
Date: Wed, 12 Oct 2016 18:16:46 +0800
From: "Hillf Danton" <hillf.zj@...baba-inc.com>
To: "'Catalin Marinas'" <catalin.marinas@....com>, <linux-mm@...ck.org>
Cc: <linux-kernel@...r.kernel.org>,
"'Andrew Morton'" <akpm@...ux-foundation.org>,
"'Andy Lutomirski'" <luto@...nel.org>,
"'CAI Qian'" <caiqian@...hat.com>
Subject: Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning
> @@ -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);
> }
>
Powered by blists - more mailing lists