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 Make sure the assignment to "idepth" is don...
details: https://anonhg.NetBSD.org/src/rev/697acd3497d2
branches: trunk
changeset: 967244:697acd3497d2
user: hannken <hannken%NetBSD.org@localhost>
date: Tue Dec 03 11:50:45 2019 +0000
description:
Make sure the assignment to "idepth" is done inside the loop to prevent
preemption between loop end and dereference of "l_cpu->ci_depth".
diffstat:
sys/arch/x86/x86/x86_machdep.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r a5204e1217c8 -r 697acd3497d2 sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c Tue Dec 03 11:50:16 2019 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c Tue Dec 03 11:50:45 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_machdep.c,v 1.131 2019/12/03 11:50:16 hannken Exp $ */
+/* $NetBSD: x86_machdep.c,v 1.132 2019/12/03 11:50:45 hannken Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.131 2019/12/03 11:50:16 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.132 2019/12/03 11:50:45 hannken Exp $");
#include "opt_modular.h"
#include "opt_physmem.h"
@@ -350,7 +350,7 @@
cpu_intr_p(void)
{
uint64_t ncsw;
- int idepth;
+ volatile int idepth;
lwp_t *l;
l = curlwp;
Home |
Main Index |
Thread Index |
Old Index