Page MenuHomeFreeBSD

D39981.diff
No OneTemporary

D39981.diff

diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -975,7 +975,8 @@
error = 0;
if ((prio & PDROP) == 0) {
- gen = malloc(sizeof(u_int) * MAXCPU, M_TEMP, M_WAITOK);
+ gen = mallocarray(sizeof(u_int), mp_maxid + 1, M_TEMP,
+ M_WAITOK);
for (cpu = 0; cpu <= mp_maxid; cpu++) {
if (!CPU_ISSET(cpu, &map) || CPU_ABSENT(cpu))
continue;

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 3, 8:25 PM (21 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16442013
Default Alt Text
D39981.diff (415 B)

Event Timeline