lkml.org 
[lkml]   [2020]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm/kmemleak: rely on rcu for task stack scanning
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>

\
 
 \ /
  Last update: 2020-08-21 13:25    [W:0.153 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site