Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Apr 2016 21:00:00 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r297940 - head/sys/arm64/arm64
Message-ID:  <201604132100.u3DL003Q091063@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Wed Apr 13 21:00:00 2016
New Revision: 297940
URL: https://svnweb.freebsd.org/changeset/base/297940

Log:
  arm64: Avoid null dereference in its_init_cpu
  
  its_init_cpu() is called from gic_v3_init_secondary(), and its_sc will
  be NULL if its did not attach.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/arm64/arm64/gic_v3_its.c

Modified: head/sys/arm64/arm64/gic_v3_its.c
==============================================================================
--- head/sys/arm64/arm64/gic_v3_its.c	Wed Apr 13 20:55:05 2016	(r297939)
+++ head/sys/arm64/arm64/gic_v3_its.c	Wed Apr 13 21:00:00 2016	(r297940)
@@ -565,7 +565,7 @@ its_init_cpu(struct gic_v3_its_softc *sc
 	 * this function was called during GICv3 secondary initialization.
 	 */
 	if (sc == NULL) {
-		if (device_is_attached(its_sc->dev)) {
+		if (its_sc != NULL && device_is_attached(its_sc->dev)) {
 			/*
 			 * XXX ARM64TODO: This is part of the workaround that
 			 * saves ITS software context for further use in



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604132100.u3DL003Q091063>