[PATCH] Fix range check on mmaped sysfs resource files

From: Ed Swierk
Date: Wed Oct 29 2008 - 01:25:11 EST


pci_mmap_fits() in 2.6.27.4 returns the wrong answer if the sysfs
resource file size is not a multiple of the page size. vm_end and
vm_start are already page-aligned, so size - start < nr, causing
mmap() to return EINVAL.

Signed-off-by: Ed Swierk <eswierk@xxxxxxxxxxxxxxxxxx>

Attachment: linux-2.6.27-pci-sysfs-mmap-bug.patch
Description: Binary data