Re: [PATCH 1/2] mm: kmsan: fix iounmap metadata teardown

From: Andrew Morton

Date: Tue Sep 15 2026 - 18:35:51 EST


On Tue, 15 Sep 2026 19:02:06 +0300 Dima Koziuk <dmytrokoziuk68@xxxxxxxxx> wrote:

> While studying the code, I noticed that kmsan_iounmap_page_range() calls
> __vunmap_range_noflush(v_shadow, vmalloc_shadow(end)) inside its per-page
> loop, and does the same for origin. The first iteration therefore unmaps
> the entire metadata range, removing the PTEs for later pages before the
> loop can recover their backing pages.

Thanks.

AI review might have a found a couple of issues - please check?

https://sashiko.dev/#/patchset/20260915160207.2952-1-dmytrokoziuk68@xxxxxxxxx