Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Assert that debugger event is triggered only for us...



details:   https://anonhg.NetBSD.org/src/rev/dc0983ef1fcb
branches:  trunk
changeset: 450976:dc0983ef1fcb
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed May 01 21:52:35 2019 +0000

description:
Assert that debugger event is triggered only for userland LWP

All passing ATF ptrace(2) tests still pass.

diffstat:

 sys/kern/kern_sig.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 5ea08eac15ee -r dc0983ef1fcb sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Wed May 01 18:20:23 2019 +0000
+++ b/sys/kern/kern_sig.c       Wed May 01 21:52:35 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.354 2019/05/01 18:01:54 kamil Exp $     */
+/*     $NetBSD: kern_sig.c,v 1.355 2019/05/01 21:52:35 kamil Exp $     */
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.354 2019/05/01 18:01:54 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.355 2019/05/01 21:52:35 kamil Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_dtrace.h"
@@ -1542,6 +1542,7 @@
        KASSERT(mutex_owned(proc_lock));
        KASSERT(mutex_owned(p->p_lock));
        KASSERT(l->l_stat == LSONPROC);
+       KASSERT((l->l_flag & LW_SYSTEM) == 0);
        KASSERT(p->p_nrlwps > 0);
 
        /*



Home | Main Index | Thread Index | Old Index