Skip to content
Commit c52eb6db authored by Muhammad Usama Anjum's avatar Muhammad Usama Anjum Committed by Andrew Morton
Browse files

selftests: mm: restore settings from only parent process

The atexit() is called from parent process as well as forked processes. 
Hence the child restores the settings at exit while the parent is still
executing.  Fix this by checking pid of atexit() calling process and only
restore THP number from parent process.

Link: https://lkml.kernel.org/r/20240314094045.157149-1-usama.anjum@collabora.com


Fixes: c23ea617 ("selftests/mm: protection_keys: save/restore nr_hugepages settings")
Signed-off-by: default avatarMuhammad Usama Anjum <usama.anjum@collabora.com>
Tested-by: default avatarJoey Gouly <joey.gouly@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 950bf45d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment