aboutsummaryrefslogtreecommitdiffstats
path: root/mm/kmemleak.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/kmemleak.c')
-rw-r--r--mm/kmemleak.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index c494fee7a2b5..74d4089d7588 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1074,7 +1074,6 @@ static void kmemleak_scan(void)
1074{ 1074{
1075 unsigned long flags; 1075 unsigned long flags;
1076 struct kmemleak_object *object, *tmp; 1076 struct kmemleak_object *object, *tmp;
1077 struct task_struct *task;
1078 int i; 1077 int i;
1079 int new_leaks = 0; 1078 int new_leaks = 0;
1080 int gray_list_pass = 0; 1079 int gray_list_pass = 0;
@@ -1141,15 +1140,16 @@ static void kmemleak_scan(void)
1141 } 1140 }
1142 1141
1143 /* 1142 /*
1144 * Scanning the task stacks may introduce false negatives and it is 1143 * Scanning the task stacks (may introduce false negatives).
1145 * not enabled by default.
1146 */ 1144 */
1147 if (kmemleak_stack_scan) { 1145 if (kmemleak_stack_scan) {
1146 struct task_struct *p, *g;
1147
1148 read_lock(&tasklist_lock); 1148 read_lock(&tasklist_lock);
1149 for_each_process(task) 1149 do_each_thread(g, p) {
1150 scan_block(task_stack_page(task), 1150 scan_block(task_stack_page(p), task_stack_page(p) +
1151 task_stack_page(task) + THREAD_SIZE, 1151 THREAD_SIZE, NULL, 0);
1152 NULL, 0); 1152 } while_each_thread(g, p);
1153 read_unlock(&tasklist_lock); 1153 read_unlock(&tasklist_lock);
1154 } 1154 }
1155 1155