HomeFreeBSD

SRAT: Don't overflow domain_pxm table

Description

SRAT: Don't overflow domain_pxm table

If we reached MAXMEMDOM, we would previously try to insert an additional
element and only detect overflow after causing (probably trivial) memory
overflow. Instead, detect the ndomain > MAXMEMDOM case before we write past
the end.

Reported by: Coverity
CID: 1354783
Sponsored by: EMC / Isilon Storage Division

Details

Provenance
cemAuthored on
Parents
rS298320: Use nitems() from sys/param.h.
Branches
Unknown
Tags
Unknown