Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 oldlwp can be NULL, so ensure it isn't.
details: https://anonhg.NetBSD.org/src/rev/8be1d81b507c
branches: trunk
changeset: 360740:8be1d81b507c
user: maxv <maxv%NetBSD.org@localhost>
date: Wed Mar 28 19:50:57 2018 +0000
description:
oldlwp can be NULL, so ensure it isn't.
diffstat:
sys/arch/x86/x86/spectre.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 28f5b3859c69 -r 8be1d81b507c sys/arch/x86/x86/spectre.c
--- a/sys/arch/x86/x86/spectre.c Wed Mar 28 19:47:54 2018 +0000
+++ b/sys/arch/x86/x86/spectre.c Wed Mar 28 19:50:57 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spectre.c,v 1.2 2018/03/28 16:02:49 maxv Exp $ */
+/* $NetBSD: spectre.c,v 1.3 2018/03/28 19:50:57 maxv Exp $ */
/*
* Copyright (c) 2018 NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.2 2018/03/28 16:02:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spectre.c,v 1.3 2018/03/28 19:50:57 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -69,7 +69,7 @@
/*
* From kernel thread to kernel thread, no need for a barrier.
*/
- if ((oldlwp->l_flag & LW_SYSTEM) &&
+ if ((oldlwp != NULL && (oldlwp->l_flag & LW_SYSTEM)) &&
(newlwp->l_flag & LW_SYSTEM))
return;
Home |
Main Index |
Thread Index |
Old Index