diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-24 10:32:33 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-07 11:12:20 -0800 |
commit | 9eff02e2042f96fb2aedd02e032eca1c5333d767 (patch) | |
tree | 677e78d73f420b69f06e839729e29c6e2a8720b5 /drivers/pci/pci.h | |
parent | ede6f5aea054d3fb67c78857f7abdee602302043 (diff) | |
download | linux-9eff02e2042f96fb2aedd02e032eca1c5333d767.tar.gz linux-9eff02e2042f96fb2aedd02e032eca1c5333d767.tar.bz2 linux-9eff02e2042f96fb2aedd02e032eca1c5333d767.zip |
PCI: check mmap range of /proc/bus/pci files too
/proc/bus/pci allows you to mmap resource ranges too, so we should probably be
checking to make sure the mapping is somewhat valid. Uses the same code as the recent sysfs mmap range checking patch from Linus.
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci.h')
-rw-r--r-- | drivers/pci/pci.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 9de87e9f98f5..d3e65e29df51 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -10,6 +10,10 @@ extern int pci_uevent(struct device *dev, struct kobj_uevent_env *env); extern int pci_create_sysfs_dev_files(struct pci_dev *pdev); extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev); extern void pci_cleanup_rom(struct pci_dev *dev); +#ifdef HAVE_PCI_MMAP +extern int pci_mmap_fits(struct pci_dev *pdev, int resno, + struct vm_area_struct *vma); +#endif /** * Firmware PM callbacks |