Commit 40a13b4
iommu/riscv: Remove overflows on the invalidation path
Since RISC-V supports a sign extended page table it should support
a gather->end of ULONG_MAX, but if this happens it will infinite loop
because of the overflow.
Also avoid overflow computing the length by moving the +1 to the other
side of the <
Fixes: 488ffbf ("iommu/riscv: Paging domain support")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>1 parent 553a127 commit 40a13b4
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
934 | | - | |
935 | | - | |
936 | 934 | | |
937 | 935 | | |
938 | 936 | | |
| |||
975 | 973 | | |
976 | 974 | | |
977 | 975 | | |
978 | | - | |
979 | | - | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
980 | 980 | | |
981 | 981 | | |
982 | | - | |
| 982 | + | |
| 983 | + | |
983 | 984 | | |
984 | 985 | | |
985 | 986 | | |
| |||
0 commit comments