Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1499467
| From | "Hillf Danton" <hillf.zj@alibaba-inc.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning |
| Date | 2016-10-12 12:30 +0200 |
| Message-ID | <sroXo-372-7@gated-at.bofh.it> (permalink) |
| References | <sroum-2vS-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> @@ -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);
> }
>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning Catalin Marinas <catalin.marinas@arm.com> - 2016-10-12 12:00 +0200
Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2016-10-12 12:30 +0200
Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning Catalin Marinas <catalin.marinas@arm.com> - 2016-10-12 12:50 +0200
Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning Michal Hocko <mhocko@kernel.org> - 2016-10-12 12:50 +0200
Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning Catalin Marinas <catalin.marinas@arm.com> - 2016-10-12 18:20 +0200
Re: [PATCH] mm: kmemleak: Ensure that the task stack is not freed during scanning CAI Qian <caiqian@redhat.com> - 2016-10-12 18:40 +0200
csiph-web