Skip to content

Commit 3bddc31

Browse files
xairyakpm00
authored andcommitted
kmsan: use stack_depot_save instead of __stack_depot_save
Make KMSAN use stack_depot_save instead of __stack_depot_save, as it always passes true to __stack_depot_save as the last argument. Link: https://lkml.kernel.org/r/18092240699efdc6acd78b51e41ea782953e6c8d.1700502145.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Reviewed-by: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Evgenii Stepanov <eugenis@google.com> Cc: Marco Elver <elver@google.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 4805180 commit 3bddc31

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mm/kmsan/core.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ depot_stack_handle_t kmsan_save_stack_with_flags(gfp_t flags,
7676
/* Don't sleep. */
7777
flags &= ~(__GFP_DIRECT_RECLAIM | __GFP_KSWAPD_RECLAIM);
7878

79-
handle = __stack_depot_save(entries, nr_entries, flags, true);
79+
handle = stack_depot_save(entries, nr_entries, flags);
8080
return stack_depot_set_extra_bits(handle, extra);
8181
}
8282

@@ -185,11 +185,10 @@ depot_stack_handle_t kmsan_internal_chain_origin(depot_stack_handle_t id)
185185
/*
186186
* @entries is a local var in non-instrumented code, so KMSAN does not
187187
* know it is initialized. Explicitly unpoison it to avoid false
188-
* positives when __stack_depot_save() passes it to instrumented code.
188+
* positives when stack_depot_save() passes it to instrumented code.
189189
*/
190190
kmsan_internal_unpoison_memory(entries, sizeof(entries), false);
191-
handle = __stack_depot_save(entries, ARRAY_SIZE(entries), __GFP_HIGH,
192-
true);
191+
handle = stack_depot_save(entries, ARRAY_SIZE(entries), __GFP_HIGH);
193192
return stack_depot_set_extra_bits(handle, extra_bits);
194193
}
195194

0 commit comments

Comments
 (0)