Commit 991f7395 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jesse Barnes

PCI: kill BKL in /proc/pci

All operations in the pci procfs ioctl functions are
atomic, so no lock is needed here.

Also add a compat_ioctl method, since all the commands
are compatible in 32 bit mode.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-pci@vger.kernel.org
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 93e75fab
...@@ -212,8 +212,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, ...@@ -212,8 +212,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
#endif /* HAVE_PCI_MMAP */ #endif /* HAVE_PCI_MMAP */
int ret = 0; int ret = 0;
lock_kernel();
switch (cmd) { switch (cmd) {
case PCIIOC_CONTROLLER: case PCIIOC_CONTROLLER:
ret = pci_domain_nr(dev->bus); ret = pci_domain_nr(dev->bus);
...@@ -242,7 +240,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd, ...@@ -242,7 +240,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
break; break;
}; };
unlock_kernel();
return ret; return ret;
} }
...@@ -306,6 +303,7 @@ static const struct file_operations proc_bus_pci_operations = { ...@@ -306,6 +303,7 @@ static const struct file_operations proc_bus_pci_operations = {
.read = proc_bus_pci_read, .read = proc_bus_pci_read,
.write = proc_bus_pci_write, .write = proc_bus_pci_write,
.unlocked_ioctl = proc_bus_pci_ioctl, .unlocked_ioctl = proc_bus_pci_ioctl,
.compat_ioctl = proc_bus_pci_ioctl,
#ifdef HAVE_PCI_MMAP #ifdef HAVE_PCI_MMAP
.open = proc_bus_pci_open, .open = proc_bus_pci_open,
.release = proc_bus_pci_release, .release = proc_bus_pci_release,
......
Markdown is supported
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