diff options
author | Eric Paris <eparis@redhat.com> | 2012-01-03 12:25:15 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2012-01-05 18:52:53 -0500 |
commit | b7e724d303b684655e4ca3dabd5a6840ad19012d (patch) | |
tree | 5474d8d49d61ade4c5e306a0485a835587237bf4 /drivers | |
parent | 6a9de49115d5ff9871d953af1a5c8249e1585731 (diff) |
capabilities: reverse arguments to security_capable
security_capable takes ns, cred, cap. But the LSM capable() hook takes
cred, ns, cap. The capability helper functions also take cred, ns, cap.
Rather than flip argument order just to flip it back, leave them alone.
Heck, this should be a little faster since argument will be in the right
place!
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 7bcf12adced7..a4457ab61342 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -431,7 +431,7 @@ pci_read_config(struct file *filp, struct kobject *kobj, | |||
431 | u8 *data = (u8*) buf; | 431 | u8 *data = (u8*) buf; |
432 | 432 | ||
433 | /* Several chips lock up trying to read undefined config space */ | 433 | /* Several chips lock up trying to read undefined config space */ |
434 | if (security_capable(&init_user_ns, filp->f_cred, CAP_SYS_ADMIN) == 0) { | 434 | if (security_capable(filp->f_cred, &init_user_ns, CAP_SYS_ADMIN) == 0) { |
435 | size = dev->cfg_size; | 435 | size = dev->cfg_size; |
436 | } else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) { | 436 | } else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) { |
437 | size = 128; | 437 | size = 128; |