From: Andrew G. Harvey Date: Tue, 23 Sep 2008 23:10:02 +0000 (+0200) Subject: UIO: Fix mapping of logical and virtual memory X-Git-Tag: v2.6.28-rc1~284^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02683ffdf655b4ae15245376ba6fea6d9e5829a6;p=pandora-kernel.git 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 Signed-off-by: Hans J. Koch Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed