Page MenuHomeFreeBSD

D32726.id97654.diff
No OneTemporary

D32726.id97654.diff

Index: sys/kern/subr_syscall.c
===================================================================
--- sys/kern/subr_syscall.c
+++ sys/kern/subr_syscall.c
@@ -261,10 +261,16 @@
* the next stop is reported as a syscall exit by
* linux_ptrace_status().
*/
- if ((td->td_dbgflags & TDB_EXEC) != 0 &&
- SV_PROC_ABI(td->td_proc) == SV_ABI_LINUX) {
- ptracestop(td, SIGTRAP, NULL);
- td->td_dbgflags &= ~TDB_EXEC;
+ if (traced && (td->td_dbgflags & TDB_EXEC) != 0 &&
+ SV_PROC_ABI(p) == SV_ABI_LINUX) {
+ PROC_LOCK(p->p_pptr);
+ if (SV_PROC_ABI(p->p_pptr) == SV_ABI_LINUX) {
+ PROC_UNLOCK(p->p_pptr);
+ ptracestop(td, SIGTRAP, NULL);
+ td->td_dbgflags &= ~TDB_EXEC;
+ } else {
+ PROC_UNLOCK(p->p_pptr);
+ }
}
/*
* If tracing the execed process, trap to the debugger

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 20, 10:22 AM (7 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17229408
Default Alt Text
D32726.id97654.diff (818 B)

Event Timeline