Page MenuHomeFreeBSD

D22546.id64856.diff
No OneTemporary

D22546.id64856.diff

Index: sys/kern/kern_sig.c
===================================================================
--- sys/kern/kern_sig.c
+++ sys/kern/kern_sig.c
@@ -65,6 +65,7 @@
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/procdesc.h>
+#include <sys/ptrace.h>
#include <sys/posix4.h>
#include <sys/pioctl.h>
#include <sys/racct.h>
@@ -1320,6 +1321,14 @@
error = 0;
}
}
+
+ /*
+ * If PTRACE_SCE or PTRACE_SCX were set after
+ * userspace entered the syscall, return spurious
+ * EINTR.
+ */
+ if ((p->p_ptevents & PTRACE_SYSCALL) != 0)
+ error = EINTR;
}
new_block = saved_mask;
@@ -1532,6 +1541,14 @@
has_sig += postsig(sig);
}
mtx_unlock(&p->p_sigacts->ps_mtx);
+
+ /*
+ * If PTRACE_SCE or PTRACE_SCX were set after
+ * userspace entered the syscall, return spurious
+ * EINTR.
+ */
+ if ((p->p_ptevents & PTRACE_SYSCALL) != 0)
+ has_sig += 1;
}
PROC_UNLOCK(p);
td->td_errno = EINTR;

File Metadata

Mime Type
text/plain
Expires
Fri, Mar 20, 6:02 AM (21 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30003116
Default Alt Text
D22546.id64856.diff (946 B)

Event Timeline