Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256847
b: refs/heads/master
c: f3c04b9
h: refs/heads/master
i:
  256845: e76dceb
  256843: 0769f93
  256839: f4f0f8a
  256831: 7867b8a
v: v3
  • Loading branch information
Tejun Heo authored and Oleg Nesterov committed Jun 22, 2011
1 parent fa7f1af commit 069d60f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 643ad8388e189dfd14ef76972cf7dc394b3cbebd
refs/heads/master: f3c04b934d429b1ace21866f011b66de328c0dc9
16 changes: 8 additions & 8 deletions trunk/include/linux/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,17 @@ static inline bool ptrace_event_enabled(struct task_struct *task, int event)
* Check whether @event is enabled and, if so, report @event and @message
* to the ptrace parent.
*
* Returns nonzero if we did a ptrace notification, zero if not.
*
* Called without locks.
*/
static inline int ptrace_event(int event, unsigned long message)
static inline void ptrace_event(int event, unsigned long message)
{
if (likely(!ptrace_event_enabled(current, event)))
return false;
current->ptrace_message = message;
ptrace_notify((event << 8) | SIGTRAP);
return true;
if (unlikely(ptrace_event_enabled(current, event))) {
current->ptrace_message = message;
ptrace_notify((event << 8) | SIGTRAP);
} else if (event == PTRACE_EVENT_EXEC && unlikely(current->ptrace)) {
/* legacy EXEC report via SIGTRAP */
send_sig(SIGTRAP, current, 0);
}
}

/**
Expand Down
4 changes: 1 addition & 3 deletions trunk/include/linux/tracehook.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,7 @@ static inline void tracehook_report_exec(struct linux_binfmt *fmt,
struct linux_binprm *bprm,
struct pt_regs *regs)
{
if (!ptrace_event(PTRACE_EVENT_EXEC, 0) &&
unlikely(current->ptrace & PT_PTRACED))
send_sig(SIGTRAP, current, 0);
ptrace_event(PTRACE_EVENT_EXEC, 0);
}

/**
Expand Down

0 comments on commit 069d60f

Please sign in to comment.