diff options
author | 2024-08-09 15:32:30 +0300 | |
---|---|---|
committer | 2024-08-15 22:16:15 -0700 | |
commit | af3b7d09a9934220a8136065a0e6985fe0b67a1b (patch) | |
tree | a94088eb6c3bd235e633cc90c5f0e404b7b77c34 /rust/helpers/task.c | |
parent | mm/numa: no task_numa_fault() call if PMD is changed (diff) | |
download | wireguard-linux-af3b7d09a9934220a8136065a0e6985fe0b67a1b.tar.xz wireguard-linux-af3b7d09a9934220a8136065a0e6985fe0b67a1b.zip |
selftests/mm: compaction_test: fix off by one in check_compaction()
The "initial_nr_hugepages" variable is unsigned long so it takes up to 20
characters to print, plus 1 more character for the NUL terminator.
Unfortunately, this buffer is not quite large enough for the terminator to
fit. Also use snprintf() for a belt and suspenders approach.
Link: https://lkml.kernel.org/r/87470c06-b45a-4e83-92ff-aac2e7b9c6ba@stanley.mountain
Fixes: fb9293b6b015 ("selftests/mm: compaction_test: fix bogus test success and reduce probability of OOM-killer invocation")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions