]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
PCI: fix range check on mmapped sysfs resource files
authorEd Swierk <eswierk@aristanetworks.com>
Mon, 3 Nov 2008 22:41:16 +0000 (14:41 -0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 3 Nov 2008 22:41:16 +0000 (14:41 -0800)
pci_mmap_fits() 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@aristanetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

No differences found