Page MenuHomeFreeBSD

D39981.1795981434.diff
No OneTemporary

Authored By
Unknown
Size
415 B
Referenced Files
None
Subscribers
None

D39981.1795981434.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
Sun, Nov 29, 7:43 PM (11 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42095405
Default Alt Text
D39981.1795981434.diff (415 B)

Event Timeline