diff options
| author | Donet Tom <[email protected]> | 2024-09-27 05:07:52 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-10-09 19:47:19 +0000 |
| commit | 76503e1fa1a53ef041a120825d5ce81c7fe7bdd7 (patch) | |
| tree | 891ab9f81f8ca8f3ab6887f011e8c8e18c03a5b2 /rust/helpers/signal.c | |
| parent | device-dax: correct pgoff align in dax_set_mapping() (diff) | |
| download | kernel-76503e1fa1a53ef041a120825d5ce81c7fe7bdd7.tar.gz kernel-76503e1fa1a53ef041a120825d5ce81c7fe7bdd7.zip | |
selftests/mm: fix incorrect buffer->mirror size in hmm2 double_map test
The hmm2 double_map test was failing due to an incorrect buffer->mirror
size. The buffer->mirror size was 6, while buffer->ptr size was 6 *
PAGE_SIZE. The test failed because the kernel's copy_to_user function was
attempting to copy a 6 * PAGE_SIZE buffer to buffer->mirror. Since the
size of buffer->mirror was incorrect, copy_to_user failed.
This patch corrects the buffer->mirror size to 6 * PAGE_SIZE.
Test Result without this patch
==============================
# RUN hmm2.hmm2_device_private.double_map ...
# hmm-tests.c:1680:double_map:Expected ret (-14) == 0 (0)
# double_map: Test terminated by assertion
# FAIL hmm2.hmm2_device_private.double_map
not ok 53 hmm2.hmm2_device_private.double_map
Test Result with this patch
===========================
# RUN hmm2.hmm2_device_private.double_map ...
# OK hmm2.hmm2_device_private.double_map
ok 53 hmm2.hmm2_device_private.double_map
Link: https://lkml.kernel.org/r/[email protected]
Fixes: fee9f6d1b8df ("mm/hmm/test: add selftests for HMM")
Signed-off-by: Donet Tom <[email protected]>
Reviewed-by: Muhammad Usama Anjum <[email protected]>
Cc: Jérôme Glisse <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Przemek Kitszel <[email protected]>
Cc: Ritesh Harjani (IBM) <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Ralph Campbell <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'rust/helpers/signal.c')
0 files changed, 0 insertions, 0 deletions
