Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262441
b: refs/heads/master
c: 9e8f90d
h: refs/heads/master
i:
  262439: d050776
v: v3
  • Loading branch information
Oleg Nesterov authored and David S. Miller committed Jul 29, 2011
1 parent 6a2cd1b commit 8a8bbcb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 177c27bf05d0ea508e65afdbe4b6998c81e46af5
refs/heads/master: 9e8f90dfe58eb19140bc66655170c7aef9eadbf2
8 changes: 6 additions & 2 deletions trunk/drivers/connector/cn_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ void proc_fork_connector(struct task_struct *task)
struct proc_event *ev;
__u8 buffer[CN_PROC_MSG_SIZE];
struct timespec ts;
struct task_struct *parent;

if (atomic_read(&proc_event_num_listeners) < 1)
return;
Expand All @@ -67,8 +68,11 @@ void proc_fork_connector(struct task_struct *task)
ktime_get_ts(&ts); /* get high res monotonic timestamp */
put_unaligned(timespec_to_ns(&ts), (__u64 *)&ev->timestamp_ns);
ev->what = PROC_EVENT_FORK;
ev->event_data.fork.parent_pid = task->real_parent->pid;
ev->event_data.fork.parent_tgid = task->real_parent->tgid;
rcu_read_lock();
parent = rcu_dereference(task->real_parent);
ev->event_data.fork.parent_pid = parent->pid;
ev->event_data.fork.parent_tgid = parent->tgid;
rcu_read_unlock();
ev->event_data.fork.child_pid = task->pid;
ev->event_data.fork.child_tgid = task->tgid;

Expand Down

0 comments on commit 8a8bbcb

Please sign in to comment.