Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern KERNEL_LOCK(9): Need kpreempt_disable to ipi_send, ...



details:   https://anonhg.NetBSD.org/src/rev/cc9ffd34a924
branches:  trunk
changeset: 369427:cc9ffd34a924
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Aug 16 16:25:16 2022 +0000

description:
KERNEL_LOCK(9): Need kpreempt_disable to ipi_send, oops.

diffstat:

 sys/kern/kern_lock.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 830d67289438 -r cc9ffd34a924 sys/kern/kern_lock.c
--- a/sys/kern/kern_lock.c      Tue Aug 16 14:00:03 2022 +0000
+++ b/sys/kern/kern_lock.c      Tue Aug 16 16:25:16 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lock.c,v 1.174 2022/08/16 00:26:39 riastradh Exp $        */
+/*     $NetBSD: kern_lock.c,v 1.175 2022/08/16 16:25:16 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2020 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.174 2022/08/16 00:26:39 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lock.c,v 1.175 2022/08/16 16:25:16 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_lockdebug.h"
@@ -255,8 +255,10 @@
                                ipi_msg_t msg = {
                                        .func = kernel_lock_trace_ipi,
                                };
+                               kpreempt_disable();
                                ipi_unicast(&msg, kernel_lock_holder);
                                ipi_wait(&msg);
+                               kpreempt_enable();
                                if (start_init_exec)
                                        _KERNEL_LOCK_ABORT("spinout");
                        }



Home | Main Index | Thread Index | Old Index