Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Oct 2016 09:54:22 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r307349 - head/sys/arm64/arm64
Message-ID:  <201610150954.u9F9sM3W070814@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Sat Oct 15 09:54:22 2016
New Revision: 307349
URL: https://svnweb.freebsd.org/changeset/base/307349

Log:
  Check we are in a critical section when calling vfp_discard. As we may call
  it with a NULL thread pointer only check when it is non-NULL.
  
  Obtained from:	ABT Systems Ltd
  Sponsored by:	The FreeBSD Foundation

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

Modified: head/sys/arm64/arm64/vfp.c
==============================================================================
--- head/sys/arm64/arm64/vfp.c	Sat Oct 15 09:10:35 2016	(r307348)
+++ head/sys/arm64/arm64/vfp.c	Sat Oct 15 09:54:22 2016	(r307349)
@@ -79,6 +79,10 @@ void
 vfp_discard(struct thread *td)
 {
 
+#ifdef INVARIANTS
+	if (td != NULL)
+		CRITICAL_ASSERT(td);
+#endif
 	if (PCPU_GET(fpcurthread) == td)
 		PCPU_SET(fpcurthread, NULL);
 



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