Commit 5a4fe7c
vfio/ccw: Add length to DMA_UNMAP checks
As pointed out with the simplification of the
VFIO_IOMMU_NOTIFY_DMA_UNMAP notifier [1], the length
parameter was never used to check against the pinned
pages.
Let's correct that, and see if a page is within the
affected range instead of simply the first page of
the range.
[1] https://lore.kernel.org/kvm/[email protected]/
Signed-off-by: Eric Farman <[email protected]>
Reviewed-by: Matthew Rosato <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>1 parent 34a255e commit 5a4fe7c
3 files changed
+13
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
175 | 178 | | |
176 | 179 | | |
177 | | - | |
178 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
179 | 183 | | |
| 184 | + | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
| |||
899 | 904 | | |
900 | 905 | | |
901 | 906 | | |
| 907 | + | |
902 | 908 | | |
903 | 909 | | |
904 | 910 | | |
905 | 911 | | |
906 | | - | |
| 912 | + | |
907 | 913 | | |
908 | 914 | | |
909 | 915 | | |
| |||
913 | 919 | | |
914 | 920 | | |
915 | 921 | | |
916 | | - | |
| 922 | + | |
917 | 923 | | |
918 | 924 | | |
919 | 925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments