Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex Use kmem_zalloc for its state, fixes pos...
details: https://anonhg.NetBSD.org/src/rev/16b8dd7e5f25
branches: trunk
changeset: 968937:16b8dd7e5f25
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Feb 01 15:33:48 2020 +0000
description:
Use kmem_zalloc for its state, fixes possible crash if a driver tries to
set affinity before a CPU is online.
diffstat:
sys/arch/arm/cortex/gicv3_its.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 1202ef69ab26 -r 16b8dd7e5f25 sys/arch/arm/cortex/gicv3_its.c
--- a/sys/arch/arm/cortex/gicv3_its.c Sat Feb 01 15:24:04 2020 +0000
+++ b/sys/arch/arm/cortex/gicv3_its.c Sat Feb 01 15:33:48 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3_its.c,v 1.24 2020/01/17 13:54:47 jmcneill Exp $ */
+/* $NetBSD: gicv3_its.c,v 1.25 2020/02/01 15:33:48 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.24 2020/01/17 13:54:47 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.25 2020/02/01 15:33:48 jmcneill Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -846,7 +846,7 @@
if ((typer & GITS_TYPER_Physical) == 0)
return ENXIO;
- its = kmem_alloc(sizeof(*its), KM_SLEEP);
+ its = kmem_zalloc(sizeof(*its), KM_SLEEP);
its->its_id = its_id;
its->its_bst = sc->sc_bst;
its->its_bsh = bsh;
Home |
Main Index |
Thread Index |
Old Index