projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0653217
)
PCI: endpoint: Add MSI set maximum restriction
author
Gustavo Pimentel
<
[email protected]
>
Thu, 19 Jul 2018 08:32:22 +0000
(10:32 +0200)
committer
Lorenzo Pieralisi
<
[email protected]
>
Thu, 19 Jul 2018 10:47:25 +0000
(11:47 +0100)
Add pci_epc_set_msi() maximum 32 interrupts validation.
Signed-off-by: Gustavo Pimentel <
[email protected]
>
Signed-off-by: Lorenzo Pieralisi <
[email protected]
>
Acked-by: Kishon Vijay Abraham I <
[email protected]
>
drivers/pci/endpoint/pci-epc-core.c
patch
|
blob
|
history
diff --git
a/drivers/pci/endpoint/pci-epc-core.c
b/drivers/pci/endpoint/pci-epc-core.c
index c72e656e7e29502012f63261a4ac761c0b5accae..094dcc3203b8d96e6f85cabb6f167a9004936521 100644
(file)
--- a/
drivers/pci/endpoint/pci-epc-core.c
+++ b/
drivers/pci/endpoint/pci-epc-core.c
@@
-201,7
+201,8
@@
int pci_epc_set_msi(struct pci_epc *epc, u8 func_no, u8 interrupts)
u8 encode_int;
unsigned long flags;
- if (IS_ERR_OR_NULL(epc) || func_no >= epc->max_functions)
+ if (IS_ERR_OR_NULL(epc) || func_no >= epc->max_functions ||
+ interrupts > 32)
return -EINVAL;
if (!epc->ops->set_msi)