Skip to content
Snippets Groups Projects
Commit 744c0670 authored by Raphael S. Carvalho's avatar Raphael S. Carvalho Committed by Pekka Enberg
Browse files

mmu: Fix page_ops initialization for anonymous VMAs


_flags is currently being used to determine which page_ops will be assigned to
the anonymous VMA, however, the variable flags received as a parameter is the
one that must be used for that purpose.

This problem was found while searching for the root of the general protection
faults that were often happening when running our test suite.
Bisect pointed to the commit 55693e5c
The GPF was probably happening due to code that should only proceed with
completely initialized anonymous VMAs.

Reviewed-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Reviewed-by: default avatarGleb Natapov <gleb@cloudius-systems.com>
Signed-off-by: default avatarRaphael S. Carvalho <raphaelsc@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent bd8eb22e
No related branches found
No related tags found
No related merge requests found
...@@ -1141,7 +1141,7 @@ static map_anon_page page_ops_init; ...@@ -1141,7 +1141,7 @@ static map_anon_page page_ops_init;
static map_page_ops *page_ops_noinitp = &page_ops_noinit, *page_ops_initp = &page_ops_init; static map_page_ops *page_ops_noinitp = &page_ops_noinit, *page_ops_initp = &page_ops_init;
anon_vma::anon_vma(addr_range range, unsigned perm, unsigned flags) anon_vma::anon_vma(addr_range range, unsigned perm, unsigned flags)
: vma(range, perm, flags, true, (_flags & mmap_uninitialized) ? page_ops_noinitp : page_ops_initp) : vma(range, perm, flags, true, (flags & mmap_uninitialized) ? page_ops_noinitp : page_ops_initp)
{ {
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment