diff options
| author | 2008-11-10 09:16:27 +0100 | |
|---|---|---|
| committer | 2008-11-10 09:16:27 +0100 | |
| commit | 4ecd33d930591d41fe356160593a9076467b961c (patch) | |
| tree | b9051a334540bbce38db1b2b03cebb4cf1d51f73 /drivers/pci/pci-sysfs.c | |
| parent | x86, NMI watchdog: disable NMIs on LVT0 in case NMI watchdog is not working (diff) | |
| parent | Linux 2.6.28-rc4 (diff) | |
| download | linux-dev-4ecd33d930591d41fe356160593a9076467b961c.tar.xz linux-dev-4ecd33d930591d41fe356160593a9076467b961c.zip | |
Merge commit 'v2.6.28-rc4' into x86/apic
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
| -rw-r--r-- | drivers/pci/pci-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 110022d78689..5d72866897a8 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -575,7 +575,7 @@ static int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; start = vma->vm_pgoff; - size = pci_resource_len(pdev, resno) >> PAGE_SHIFT; + size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1; if (start < size && size - start >= nr) return 1; WARN(1, "process \"%s\" tried to map 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n", |
