HomeFreeBSD

mips: fix early kernel panic when setting up interrupt counters

Description

mips: fix early kernel panic when setting up interrupt counters

Commit 248f0ca converted intrcnt and intrnames from u_long[]
and char[] to u_long* and char* respectively, but for non-INTRNG mips
these symbols were defined in .S file as a pre-allocated static arrays,
so the problem wasn't cought at compile time. Conversion from an array
to a pointer requires pointer initialization and it wasn't done
for MIPS, so whatever happenned to be in the begginning of intcnt[]
array was used as a pointer value.

Move intrcnt/intrnames to C code and allocate them dynamically
although with a fixed size at the moment.

Reviewed by: emaste
PR: 253051
Differential Revision: https://reviews.freebsd.org/D28424
MFC after: 1 day

Details

Provenance
gonzoAuthored on Jan 30 2021, 6:11 AM
Reviewer
emaste
Differential Revision
D28424: mips: fix early kernel panic when setting up interrupt counters
Parents
rG5299d64b2b9f: libc: fix buffer overrun in getrpcport(3)
Branches
Unknown
Tags
Unknown