diff options
author | Lizhi Hou <[email protected]> | 2023-09-29 10:10:48 -0700 |
---|---|---|
committer | Bjorn Helgaas <[email protected]> | 2023-09-29 17:33:46 -0500 |
commit | 33efa29e825636a06d5711c9dfccf92726d2fc81 (patch) | |
tree | 889344961aba955a640d9674564cb838697d17c2 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 6a878a54d0053ef21f3b829dc267487c2302b012 (diff) |
PCI: of_property: Handle interrupt parsing failures
of_pci_prop_intr_map() uses uninitialized addr_sz[] values if
of_irq_parse_raw() fails, which leads to intermittent crashes.
Clear addr_sz[] before use so we never use uninitialized elements.
If no valid IRQs are parsed, don't bother adding the interrupt-map
property.
Fixes: 407d1a51921e ("PCI: Create device tree node for bridge")
Link: https://lore.kernel.org/r/[email protected]
Reported-by: Jonathan Cameron <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Reported-by: Herve Codina <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Lizhi Hou <[email protected]>
[bhelgaas: commit log, add similar report from Herve]
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Herve Codina <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions