aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authoraigourensheng <shechenglong001@gmail.com>2024-06-17 01:29:34 -0400
committerAndrew Morton <akpm@linux-foundation.org>2024-06-24 20:52:10 -0700
commit8b8546d298dc9ce9d5d01a06c822e255d2159ca7 (patch)
tree14fce2f7828058791276211fdb83d45942a12525 /net/unix/af_unix.c
parentff202303c398ed56386ca4954154de9a96eb732a (diff)
downloadlinux-8b8546d298dc9ce9d5d01a06c822e255d2159ca7.tar.gz
linux-8b8546d298dc9ce9d5d01a06c822e255d2159ca7.tar.bz2
linux-8b8546d298dc9ce9d5d01a06c822e255d2159ca7.zip
selftests/mm:fix test_prctl_fork_exec return failure
After calling fork() in test_prctl_fork_exec(), 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. Link: https://lkml.kernel.org/r/20240617052934.5834-1-shechenglong001@gmail.com Signed-off-by: aigourensheng <shechenglong001@gmail.com> Acked-by: David Hildenbrand <david@redhat.com> Cc: Shuah Khan <shuah@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions