diff options
author | Binbin Wu <binbin.wu@linux.intel.com> | 2023-10-16 14:24:46 +0800 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-10-16 11:39:57 +0200 |
commit | 29060633411a02f6f2dd9d5245919385d69d81f0 (patch) | |
tree | 46918fa25b56809a0ff41e58ea2a005c2280de6b /arch/x86/mm/numa.c | |
parent | x86/sev: Drop unneeded #include (diff) | |
download | linux-29060633411a02f6f2dd9d5245919385d69d81f0.tar.gz linux-29060633411a02f6f2dd9d5245919385d69d81f0.tar.bz2 linux-29060633411a02f6f2dd9d5245919385d69d81f0.zip |
selftests/x86/lam: Zero out buffer for readlink()
Zero out the buffer for readlink() since readlink() does not append a
terminating null byte to the buffer. Also change the buffer length
passed to readlink() to 'PATH_MAX - 1' to ensure the resulting string
is always null terminated.
Fixes: 833c12ce0f430 ("selftests/x86/lam: Add inherit test cases for linear-address masking")
Signed-off-by: Binbin Wu <binbin.wu@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/r/20231016062446.695-1-binbin.wu@linux.intel.com
Diffstat (limited to 'arch/x86/mm/numa.c')
0 files changed, 0 insertions, 0 deletions