HomeFreeBSD

Fix read past end of struct in ncsw glue code.

Description

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

Details

Provenance
bdragonAuthored on
Differential Revision
D21988: [PowerPC] [BookE] Fix read past end of struct
Parents
rS353458: Add a missing include of opt_sctp.h.
Branches
Unknown
Tags
Unknown