Re: kvm crash in 5.14.1?

From: Stephen
Date: Sun Oct 03 2021 - 01:48:13 EST


> I think this should fix the problems?
>
> diff --git a/include/linux/secretmem.h b/include/linux/secretmem.h
> index 21c3771e6a56..988528b5da43 100644
> --- a/include/linux/secretmem.h
> +++ b/include/linux/secretmem.h
> @@ -23,7 +23,7 @@ static inline bool page_is_secretmem(struct page *page)
>         mapping = (struct address_space *)
>                 ((unsigned long)page->mapping & ~PAGE_MAPPING_FLAGS);
>
> -       if (mapping != page->mapping)
> +       if (!mapping || mapping != page->mapping)
>                 return false;
>
>         return mapping->a_ops == &secretmem_aops;

I have validated that my system was stable after several days on
v5.13.19. I'm now booted into a v5.14.8 kernel with this patch, and I'll
try to report back if I see a crash; or in roughly a week if the system
seems to have stabilized.

Thanks,
    Stephen