Skip to content

Commit bdbd01a

Browse files
committed
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
2 parents 2ebc8ec + 8c05cd0 commit bdbd01a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/pci/pci-sysfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vma,
715715
nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
716716
start = vma->vm_pgoff;
717717
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) ?
719719
pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0;
720720
if (start >= pci_start && start < pci_start + size &&
721721
start + nr <= pci_start + size)

0 commit comments

Comments
 (0)