disable SA upcalls during "systrmsg" sleep

-> improves problem from PR bin/23429
This commit is contained in:
cl 2004-03-14 00:48:58 +00:00
parent 63fe298156
commit f1bacc8b38

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_systrace.c,v 1.36 2004/01/16 05:03:02 mrg Exp $ */
/* $NetBSD: kern_systrace.c,v 1.37 2004/03/14 00:48:58 cl Exp $ */
/*
* Copyright 2002, 2003 Niels Provos <provos@citi.umich.edu>
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.36 2004/01/16 05:03:02 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.37 2004/03/14 00:48:58 cl Exp $");
#include "opt_systrace.h"
@ -56,6 +56,8 @@ __KERNEL_RCSID(0, "$NetBSD: kern_systrace.c,v 1.36 2004/01/16 05:03:02 mrg Exp $
#include <sys/ptrace.h>
#include <sys/namei.h>
#include <sys/systrace.h>
#include <sys/sa.h>
#include <sys/savar.h>
#include <compat/common/compat_util.h>
@ -1673,7 +1675,11 @@ systrace_make_msg(struct str_process *strp, int type, struct str_message *tmsg)
SYSTRACE_UNLOCK(fst, strp->proc);
while (1) {
int f;
f = curlwp->l_flag & L_SA;
curlwp->l_flag &= ~L_SA;
st = tsleep(strp, PWAIT | PCATCH, "systrmsg", 0);
curlwp->l_flag |= f;
if (st != 0)
return (ERESTART);
/* If we detach, then everything is permitted */