aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-11-16 13:51:56 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-11-16 13:51:56 -0500
commitbdbd01ac444bffb3c9aefed3059d12554059b320 (patch)
tree1ee6fe62d019b2f487abe6d3250b348bb667fc3c /drivers
parent2ebc8ec86fe0f3f3acf9ba9b41a368f819e7807e (diff)
parent8c05cd08a7504b855c265263e84af61aabafa329 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: fix offset check for sysfs mmapped files
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci-sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 95712a375cd5..63d5042f2079 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -715,7 +715,7 @@ int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vma,
715 nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 715 nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
716 start = vma->vm_pgoff; 716 start = vma->vm_pgoff;
717 size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1; 717 size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1;
718 pci_start = (mmap_api == PCI_MMAP_SYSFS) ? 718 pci_start = (mmap_api == PCI_MMAP_PROCFS) ?
719 pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0; 719 pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0;
720 if (start >= pci_start && start < pci_start + size && 720 if (start >= pci_start && start < pci_start + size &&
721 start + nr <= pci_start + size) 721 start + nr <= pci_start + size)