diff options
author | Jason Gunthorpe <[email protected]> | 2018-06-29 11:31:50 -0600 |
---|---|---|
committer | Alex Williamson <[email protected]> | 2018-06-30 13:58:09 -0600 |
commit | bb94b55af3461e26b32f0e23d455abeae0cfca5d (patch) | |
tree | 452551a00278b41d599598e1e80eed6b2e7c365b /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 7733e05b34f5d855c5590d816b41ddfee972d188 (diff) |
vfio: Use get_user_pages_longterm correctly
The patch noted in the fixes below converted get_user_pages_fast() to
get_user_pages_longterm(), however the two calls differ in a few ways.
First _fast() is documented to not require the mmap_sem, while _longterm()
is documented to need it. Hold the mmap sem as required.
Second, _fast accepts an 'int write' while _longterm uses 'unsigned int
gup_flags', so the expression '!!(prot & IOMMU_WRITE)' is only working by
luck as FOLL_WRITE is currently == 0x1. Use the expected FOLL_WRITE
constant instead.
Fixes: 94db151dc892 ("vfio: disable filesystem-dax page pinning")
Cc: <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Acked-by: Dan Williams <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions