[LTP] [PATCH 2/2] ksm06: lock memory about to be merged
Petr Vorel
pvorel@suse.cz
Mon Feb 28 14:16:42 CET 2022
Hi Cyril,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Good catch!
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> ---
> testcases/kernel/mem/lib/mem.c | 3 +++
> 1 file changed, 3 insertions(+)
> diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
> index 39e3f1791..f1756b34a 100644
> --- a/testcases/kernel/mem/lib/mem.c
> +++ b/testcases/kernel/mem/lib/mem.c
> @@ -565,6 +565,9 @@ void test_ksm_merge_across_nodes(unsigned long nr_pages)
> #endif
> memset(memory[i], 10, length);
> +
> + if (mlock(memory[i], length))
> + tst_res(TINFO | TERRNO, "mlock() failed");
I'd consider using TWARN.
Kind regards,
Petr
More information about the ltp
mailing list