Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern PR/51685: Kamil Rytarowski: Fill sigcontext info in...
details: https://anonhg.NetBSD.org/src/rev/08d725747520
branches: trunk
changeset: 349292:08d725747520
user: christos <christos%NetBSD.org@localhost>
date: Sun Dec 04 16:40:43 2016 +0000
description:
PR/51685: Kamil Rytarowski: Fill sigcontext info in kpsignal2 so that the
debugger/core-dump signal info gets filled in in all code paths (including
the lwp_kill one).
diffstat:
sys/kern/kern_sig.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (41 lines):
diff -r d58982eec2df -r 08d725747520 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c Sun Dec 04 13:37:45 2016 +0000
+++ b/sys/kern/kern_sig.c Sun Dec 04 16:40:43 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.330 2016/09/13 07:39:45 martin Exp $ */
+/* $NetBSD: kern_sig.c,v 1.331 2016/12/04 16:40:43 christos 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.330 2016/09/13 07:39:45 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.331 2016/12/04 16:40:43 christos Exp $");
#include "opt_ptrace.h"
#include "opt_dtrace.h"
@@ -923,10 +923,6 @@
mask, ksi);
}
} else {
- /* XXX for core dump/debugger */
- p->p_sigctx.ps_lwp = l->l_lid;
- p->p_sigctx.ps_signo = ksi->ksi_signo;
- p->p_sigctx.ps_code = ksi->ksi_trap;
kpsignal2(p, ksi);
mutex_exit(p->p_lock);
mutex_exit(proc_lock);
@@ -1242,6 +1238,11 @@
if (p->p_stat != SACTIVE && p->p_stat != SSTOP)
return 0;
+ /* XXX for core dump/debugger */
+ p->p_sigctx.ps_lwp = ksi->ksi_lid;
+ p->p_sigctx.ps_signo = ksi->ksi_signo;
+ p->p_sigctx.ps_code = ksi->ksi_trap;
+
/*
* Notify any interested parties of the signal.
*/
Home |
Main Index |
Thread Index |
Old Index