diff options
author | Miaohe Lin <[email protected]> | 2022-06-09 21:08:35 +0800 |
---|---|---|
committer | akpm <[email protected]> | 2022-06-16 19:48:30 -0700 |
commit | ed913b055a74b723976f8e885a3395162a0371e6 (patch) | |
tree | f072fe1621a6904e3e78a851f9fce5134d365f49 /include/linux/fpga/fpga-bridge.h | |
parent | 23689037e0986724e3bdc41bb2ee6fa1b497b8f9 (diff) |
lib/test_hmm: avoid accessing uninitialized pages
If make_device_exclusive_range() fails or returns pages marked for
exclusive access less than required, remaining fields of pages will left
uninitialized. So dmirror_atomic_map() will access those yet
uninitialized fields of pages. To fix it, do dmirror_atomic_map() iff all
pages are marked for exclusive access (we will break if mapped is less
than required anyway) so we won't access those uninitialized fields of
pages.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: b659baea7546 ("mm: selftests for exclusive device memory")
Signed-off-by: Miaohe Lin <[email protected]>
Cc: Jerome Glisse <[email protected]>
Cc: Alistair Popple <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Ralph Campbell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-bridge.h')
0 files changed, 0 insertions, 0 deletions