Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145492
b: refs/heads/master
c: 087eb43
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jun 5, 2009
1 parent 85e1a74 commit b86980f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 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: b87297fb405ef13cac375f202d114323b076a56d
refs/heads/master: 087eb437051b3de817720f9c80c440fc9e7dcce8
11 changes: 5 additions & 6 deletions trunk/include/linux/tracehook.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,12 @@ static inline void tracehook_finish_clone(struct task_struct *child,

/**
* tracehook_report_clone - in parent, new child is about to start running
* @trace: return value from tracehook_prepare_clone()
* @regs: parent's user register state
* @clone_flags: flags from parent's system call
* @pid: new child's PID in the parent's namespace
* @child: new child task
*
* Called after a child is set up, but before it has been started
* running. @trace is the value returned by tracehook_prepare_clone().
* Called after a child is set up, but before it has been started running.
* This is not a good place to block, because the child has not started
* yet. Suspend the child here if desired, and then block in
* tracehook_report_clone_complete(). This must prevent the child from
Expand All @@ -276,13 +274,14 @@ static inline void tracehook_finish_clone(struct task_struct *child,
*
* Called with no locks held, but the child cannot run until this returns.
*/
static inline void tracehook_report_clone(int trace, struct pt_regs *regs,
static inline void tracehook_report_clone(struct pt_regs *regs,
unsigned long clone_flags,
pid_t pid, struct task_struct *child)
{
if (unlikely(trace) || unlikely(clone_flags & CLONE_PTRACE)) {
if (unlikely(task_ptrace(child))) {
/*
* The child starts up with an immediate SIGSTOP.
* It doesn't matter who attached/attaching to this
* task, the pending SIGSTOP is right in any case.
*/
sigaddset(&child->pending.signal, SIGSTOP);
set_tsk_thread_flag(child, TIF_SIGPENDING);
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ long do_fork(unsigned long clone_flags,
}

audit_finish_fork(p);
tracehook_report_clone(trace, regs, clone_flags, nr, p);
tracehook_report_clone(regs, clone_flags, nr, p);

/*
* We set PF_STARTING at creation in case tracing wants to
Expand Down

0 comments on commit b86980f

Please sign in to comment.