freebsd-dev/sys/contrib/ncsw
Brandon Bergren 9f15304d32 Fix read past end of struct in ncsw glue code.
The logic in XX_IsPortalIntr() was reading past the end of XX_PInfo.
This was causing it to erroneously return 1 instead of 0 in some
circumstances, causing a panic on the AmigaOne X5000 due to mixing
exclusive and nonexclusive interrupts on the same interrupt line.

Since this code is only called a couple of times during startup, use
a simple double loop instead of the complex read-ahead single loop.

This also fixes a bug where it would never check cpu=0 on type=1.

Approved by: jhibbits (mentor)
Differential Revision: https://reviews.freebsd.org/D21988
2019-10-12 23:16:17 +00:00
..
build
etc Rename a couple files to not conflict with ZFS filenames 2017-11-01 03:09:16 +00:00
inc dpaa: Fix warnings in dtsec(4) found by clang 2019-08-21 02:26:22 +00:00
integrations Remove SoC-specific integrations from dTSEC, to make it SoC agnostic. 2016-07-05 06:16:42 +00:00
Peripherals dpaa(4): Fix memcpy size for threshold copy in NCSW contrib 2019-09-28 02:49:46 +00:00
user/env Fix read past end of struct in ncsw glue code. 2019-10-12 23:16:17 +00:00