Re: [PATCH] selftests/mm:fix test_prctl_fork_exec return failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17.06.24 07:29, aigourensheng wrote:
after calling fork() in the test_prctl_fork_exec() function,
the global variable ksm_full_scans_fd is initialized to 0
in the child process upon entering the main function
of ./ksm_functional_tests.
In the function call chain test_child_ksm() ->
__mmap_and_merge_range -> ksm_merge-> ksm_get_full_scans,
start_scans = ksm_get_full_scans() will return an error.
Therefore, the value of ksm_full_scans_fd needs to be
initialized before calling test_child_ksm in the child process.

Signed-off-by: aigourensheng <shechenglong001@xxxxxxxxx>
---

Acked-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux