diff options
-rw-r--r-- | include/linux/ptrace.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index c2f1f6a5fcb8..6fdb196caa3e 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -199,9 +199,10 @@ static inline void ptrace_event(int event, unsigned long message) | |||
199 | if (unlikely(ptrace_event_enabled(current, event))) { | 199 | if (unlikely(ptrace_event_enabled(current, event))) { |
200 | current->ptrace_message = message; | 200 | current->ptrace_message = message; |
201 | ptrace_notify((event << 8) | SIGTRAP); | 201 | ptrace_notify((event << 8) | SIGTRAP); |
202 | } else if (event == PTRACE_EVENT_EXEC && unlikely(current->ptrace)) { | 202 | } else if (event == PTRACE_EVENT_EXEC) { |
203 | /* legacy EXEC report via SIGTRAP */ | 203 | /* legacy EXEC report via SIGTRAP */ |
204 | send_sig(SIGTRAP, current, 0); | 204 | if ((current->ptrace & (PT_PTRACED|PT_SEIZED)) == PT_PTRACED) |
205 | send_sig(SIGTRAP, current, 0); | ||
205 | } | 206 | } |
206 | } | 207 | } |
207 | 208 | ||