]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - mm/kmemleak.c
Merge tag 'linux-kselftest-kunit-5.10-rc1' of git://git.kernel.org/pub/scm/linux...
[mirror_ubuntu-jammy-kernel.git] / mm / kmemleak.c
index 5e252d91eb14b1e717daf28f934462f47f12ee87..c0014d3b91c10f2689f99d83c9ba2bd04cbbfea7 100644 (file)
@@ -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();
        }
 
        /*