Module Name:    src
Committed By:   martin
Date:           Mon Feb 10 18:17:57 UTC 2020

Modified Files:
        src/sys/arch/arm/cortex [netbsd-9]: gicv3_its.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #680):

        sys/arch/arm/cortex/gicv3_its.c: revision 1.25

Use kmem_zalloc for its state, fixes possible crash if a driver tries to
set affinity before a CPU is online.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.2.1 src/sys/arch/arm/cortex/gicv3_its.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/cortex/gicv3_its.c
diff -u src/sys/arch/arm/cortex/gicv3_its.c:1.21 src/sys/arch/arm/cortex/gicv3_its.c:1.21.2.1
--- src/sys/arch/arm/cortex/gicv3_its.c:1.21	Sun Jun 30 17:33:59 2019
+++ src/sys/arch/arm/cortex/gicv3_its.c	Mon Feb 10 18:17:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3_its.c,v 1.21 2019/06/30 17:33:59 jmcneill Exp $ */
+/* $NetBSD: gicv3_its.c,v 1.21.2.1 2020/02/10 18:17:57 martin 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.21 2019/06/30 17:33:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.21.2.1 2020/02/10 18:17:57 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -846,7 +846,7 @@ gicv3_its_init(struct gicv3_softc *sc, b
 	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;

Reply via email to