diff options
Diffstat (limited to 'drivers/pci/syscall.c')
-rw-r--r-- | drivers/pci/syscall.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c index d96626c614f5..31e39558d49d 100644 --- a/drivers/pci/syscall.c +++ b/drivers/pci/syscall.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
9 | #include <linux/pci.h> | 9 | #include <linux/pci.h> |
10 | #include <linux/security.h> | ||
10 | #include <linux/syscalls.h> | 11 | #include <linux/syscalls.h> |
11 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
12 | #include "pci.h" | 13 | #include "pci.h" |
@@ -90,7 +91,8 @@ SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn, | |||
90 | u32 dword; | 91 | u32 dword; |
91 | int err = 0; | 92 | int err = 0; |
92 | 93 | ||
93 | if (!capable(CAP_SYS_ADMIN)) | 94 | if (!capable(CAP_SYS_ADMIN) || |
95 | security_locked_down(LOCKDOWN_PCI_ACCESS)) | ||
94 | return -EPERM; | 96 | return -EPERM; |
95 | 97 | ||
96 | dev = pci_get_domain_bus_and_slot(0, bus, dfn); | 98 | dev = pci_get_domain_bus_and_slot(0, bus, dfn); |