svn commit: r307349 - head/sys/arm64/arm64

Andrew Turner andrew at FreeBSD.org
Sat Oct 15 09:54:23 UTC 2016


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);
 


More information about the svn-src-all mailing list