diff options
author | Steve Sistare <[email protected]> | 2021-02-25 11:25:02 -0800 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2021-03-16 10:39:27 -0600 |
commit | 7dc4b2fdb27242faf40fc20ef83372b7033af050 (patch) | |
tree | bb7f3e5cc64e0c07232bc8293507782dbe455d56 /fs/jbd2/commit.c | |
parent | 1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff) |
vfio/type1: fix unmap all on ILP32
Some ILP32 architectures support mapping a 32-bit vaddr within a 64-bit
iova space. The unmap-all code uses 32-bit SIZE_MAX as an upper bound on
the extent of the mappings within iova space, so mappings above 4G cannot
be found and unmapped. Use U64_MAX instead, and use u64 for size variables.
This also fixes a static analysis bug found by the kernel test robot running
smatch for ILP32.
Fixes: 0f53afa12bae ("vfio/type1: unmap cleanup")
Fixes: c19650995374 ("vfio/type1: implement unmap all")
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Steve Sistare <[email protected]>
Message-Id: <[email protected]>
Link: https://lore.kernel.org/linux-mm/20210222141043.GW2222@kadam
Reviewed-by: Cornelia Huck <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'fs/jbd2/commit.c')
0 files changed, 0 insertions, 0 deletions