Commit c52eb6d
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: c23ea61 ("selftests/mm: protection_keys: save/restore nr_hugepages settings")
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Tested-by: Joey Gouly <joey.gouly@arm.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 950bf45 commit c52eb6d
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1745 | 1745 | | |
1746 | 1746 | | |
1747 | 1747 | | |
| 1748 | + | |
| 1749 | + | |
1748 | 1750 | | |
1749 | 1751 | | |
1750 | | - | |
| 1752 | + | |
| 1753 | + | |
1751 | 1754 | | |
1752 | 1755 | | |
1753 | 1756 | | |
| |||
1773 | 1776 | | |
1774 | 1777 | | |
1775 | 1778 | | |
| 1779 | + | |
1776 | 1780 | | |
1777 | 1781 | | |
1778 | 1782 | | |
| |||
0 commit comments