Skip to content
Commit 88e7df0b authored by Ed Swierk's avatar Ed Swierk Committed by Jesse Barnes
Browse files

PCI: fix range check on mmapped sysfs resource files



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: default avatarEd Swierk <eswierk@aristanetworks.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent f5dafca5
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment