Skip to content
Commit 0e1657ba authored by Ryan Roberts's avatar Ryan Roberts
Browse files

selftests/mm: Fix thuge-gen test bugs



thuge-gen was previously only munmapping part of the mmapped buffer,
which caused us to run out of 1G huge pages for a later part of the
test. Fix this by munmapping the whole buffer. Based on the code, it
looks like a typo rather than an intention to keep some of the buffer
mapped.

thuge-gen was also calling mmap with SHM_HUGETLB flag (bit 11 set),
which is actually MAP_DENYWRITE in mmap context. The man page says this
flag is ignored in modern kernels. I'm pretty sure from the context that
the author intended to pass the MAP_HUGETLB flag so I've fixed that up
too.

Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: Ryan Roberts's avatarRyan Roberts <ryan.roberts@arm.com>
parent 6651f7a3
Loading
Loading
Loading
Loading
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