Skip to contentSkip to conversation

kmsan: fix a stale comment in kmsan_save_stack_with_flags()

PATCH Applied Zhen Lei 2 participants 2 messages Mar 27, 2023

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 kmsan: fix a stale comment in kmsan_save_stack_with_flags()

After commit 446ec83805dd ("mm/page_alloc: use might_alloc()") and commit 84172f4bb752 ("mm/page_alloc: combine __alloc_pages and __alloc_pages_nodemask"), the comment is no longer accurate. Flag '__GFP_DIRECT_RECLAIM' is clear enough on its own, so remove the comment rather than update it.

---
 mm/kmsan/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mm/kmsan/core.c +1 -1
index f710257d68670ee..7d1e4aa30bae622 100644
@@ -73,7 +73,7 @@ depot_stack_handle_t kmsan_save_stack_with_flags(gfp_t flags,
 
 	nr_entries = stack_trace_save(entries, KMSAN_STACK_DEPTH, 0);
 
-	/* Don't sleep (see might_sleep_if() in __alloc_pages_nodemask()). */
+	/* Don't sleep. */
 	flags &= ~__GFP_DIRECT_RECLAIM;
 
 	handle = __stack_depot_save(entries, nr_entries, flags, true);
Signature · 1 line
2.25.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Zhen Lei

After commit 446ec83805dd ("mm/page_alloc: use might_alloc()") and commit 84172f4bb752 ("mm/page_alloc: combine __alloc_pages and __alloc_pages_nodemask"), the comment is no longer accurate. Flag '__GFP_DIRECT_RECLAIM' is clear enough on its own, so remove the comment rather than update it.

mm/kmsan/core.c depot_stack_handle_t kmsan_save_stack_with_flags(gfp_t flags, · line 76

Quoted 5 lines
        nr_entries = stack_trace_save(entries, KMSAN_STACK_DEPTH, 0);
mm/kmsan/core.c +1 -1
-       /* Don't sleep (see might_sleep_if() in __alloc_pages_nodemask()). */
+       /* Don't sleep. */

Thanks for spotting this!