summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_kthread.c
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2017-10-23 18:25:21 +0000
committerbdrewery <bdrewery@FreeBSD.org>2017-10-23 18:25:21 +0000
commit4b13cb33c40720888fe967367bf009ca6cf272fd (patch)
tree4491d3f5e0ad545aca21ef8c4ab7b103f46b625f /sys/kern/kern_kthread.c
parentb916159a6fa3858710d1a0f75cb5a26825ccc698 (diff)
downloadFreeBSD-src-4b13cb33c40720888fe967367bf009ca6cf272fd.zip
FreeBSD-src-4b13cb33c40720888fe967367bf009ca6cf272fd.tar.gz
MFC r316286:
Add support for capturing 'struct ptrace_lwpinfo' for signals resulting in a process dumping core in the corefile. Direct stable changed: Padding added to struct thread and td_si added to end with explicit bzeroing when forking/initializing a thread to preserve KBI.
Diffstat (limited to 'sys/kern/kern_kthread.c')
-rw-r--r--sys/kern/kern_kthread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c
index 69c1140..f5c62cc 100644
--- a/sys/kern/kern_kthread.c
+++ b/sys/kern/kern_kthread.c
@@ -274,6 +274,7 @@ kthread_add(void (*func)(void *), void *arg, struct proc *p,
bzero(&newtd->td_startzero,
__rangeof(struct thread, td_startzero, td_endzero));
newtd->td_sleeptimo = 0;
+ bzero(&newtd->td_si, sizeof(newtd->td_si));
bcopy(&oldtd->td_startcopy, &newtd->td_startcopy,
__rangeof(struct thread, td_startcopy, td_endcopy));
newtd->td_sa = oldtd->td_sa;
OpenPOWER on IntegriCloud