Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UIO: Fix mapping of logical and virtual memory
mmap() doesn't work as expected for UIO_MEM_LOGICAL or UIO_MEM_VIRTUAL mappings. The offset into the memory needs to be added, otherwise uio_vma_fault always returns the first page only. Note that for UIO userspace calls mmap() with offset = N * getpagesize() to access mapping N. This must be compensated when calculating the offset. A comment was added to explain this since it is not obvious. Signed-off-by: Andrew G. Harvey <[email protected]> Signed-off-by: Hans J. Koch <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information