]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
x86: make some use of mallocarray(9).
authorpfg <pfg@FreeBSD.org>
Mon, 15 Jan 2018 21:08:22 +0000 (21:08 +0000)
committerpfg <pfg@FreeBSD.org>
Mon, 15 Jan 2018 21:08:22 +0000 (21:08 +0000)
commita7c6776f5977a9f4bf44f3842e1158354a205144
tree44bf5d906a57c3b0da4bac4937e8a10686cdb3fb
parent3c9ef6852180e8146bd0e6c1487067435f6e3a92
x86: make some use of mallocarray(9).

Focus on code where we are doing multiplications within malloc(9). None of
these ire likely to overflow, however the change is still useful as some
static checkers can benefit from the allocation attributes we use for
mallocarray.

This initial sweep only covers malloc(9) calls with M_NOWAIT. No good
reason but I started doing the changes before r327796 and at that time it
was convenient to make sure the sorrounding code could handle NULL values.

X-Differential revision: https://reviews.freebsd.org/D13837
sys/amd64/amd64/bpf_jit_machdep.c
sys/i386/i386/bpf_jit_machdep.c
sys/i386/i386/k6_mem.c
sys/x86/cpufreq/est.c