* [PATCH] kmsan: fix a stale comment in kmsan_save_stack_with_flags()
@ 2023-03-27 3:41 Zhen Lei
2023-03-27 11:05 ` Alexander Potapenko
0 siblings, 1 reply; 2+ messages in thread
From: Zhen Lei @ 2023-03-27 3:41 UTC (permalink / raw)
To: Alexander Potapenko, Marco Elver, Dmitry Vyukov, Andrew Morton,
kasan-dev, linux-mm, linux-kernel
Cc: 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.
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
mm/kmsan/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kmsan/core.c b/mm/kmsan/core.c
index f710257d68670ee..7d1e4aa30bae622 100644
--- a/mm/kmsan/core.c
+++ b/mm/kmsan/core.c
@@ -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);
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] kmsan: fix a stale comment in kmsan_save_stack_with_flags()
2023-03-27 3:41 [PATCH] kmsan: fix a stale comment in kmsan_save_stack_with_flags() Zhen Lei
@ 2023-03-27 11:05 ` Alexander Potapenko
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Potapenko @ 2023-03-27 11:05 UTC (permalink / raw)
To: Zhen Lei
Cc: Marco Elver, Dmitry Vyukov, Andrew Morton, kasan-dev, linux-mm,
linux-kernel
On Mon, Mar 27, 2023 at 5:45 AM Zhen Lei <thunder.leizhen@huawei.com> wrote:
>
> 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.
>
> Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: Alexander Potapenko <glider@google.com>
>
> nr_entries = stack_trace_save(entries, KMSAN_STACK_DEPTH, 0);
>
> - /* Don't sleep (see might_sleep_if() in __alloc_pages_nodemask()). */
> + /* Don't sleep. */
Thanks for spotting this!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-27 11:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 3:41 [PATCH] kmsan: fix a stale comment in kmsan_save_stack_with_flags() Zhen Lei
2023-03-27 11:05 ` Alexander Potapenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox