|
@@ -636,7 +636,7 @@ static ssize_t pci_read_config(struct file *filp, struct kobject *kobj,
|
|
u8 *data = (u8 *) buf;
|
|
u8 *data = (u8 *) buf;
|
|
|
|
|
|
/* Several chips lock up trying to read undefined config space */
|
|
/* Several chips lock up trying to read undefined config space */
|
|
- if (security_capable(filp->f_cred, &init_user_ns, CAP_SYS_ADMIN) == 0)
|
|
|
|
|
|
+ if (file_ns_capable(filp, &init_user_ns, CAP_SYS_ADMIN))
|
|
size = dev->cfg_size;
|
|
size = dev->cfg_size;
|
|
else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
|
|
else if (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
|
|
size = 128;
|
|
size = 128;
|