projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automate string extraction for syscalls
[lttng-modules.git]
/
lttng-context-vppid.c
diff --git
a/lttng-context-vppid.c
b/lttng-context-vppid.c
index 4abf784613afebf844f9be3ed92946519dbff31f..f01b02068d67fa8ef1bdfc8e1a278f93b27cf618 100644
(file)
--- a/
lttng-context-vppid.c
+++ b/
lttng-context-vppid.c
@@
-31,10
+31,18
@@
void vppid_record(struct lttng_ctx_field *field,
struct lib_ring_buffer_ctx *ctx,
struct ltt_channel *chan)
{
struct lib_ring_buffer_ctx *ctx,
struct ltt_channel *chan)
{
+ struct task_struct *parent;
pid_t vppid;
pid_t vppid;
+ /*
+ * nsproxy can be NULL when scheduled out of exit.
+ */
rcu_read_lock();
rcu_read_lock();
- vppid = task_tgid_vnr(current->real_parent);
+ parent = rcu_dereference(current->real_parent);
+ if (!parent->nsproxy)
+ vppid = 0;
+ else
+ vppid = task_tgid_vnr(parent);
rcu_read_unlock();
lib_ring_buffer_align_ctx(ctx, ltt_alignof(vppid));
chan->ops->event_write(ctx, &vppid, sizeof(vppid));
rcu_read_unlock();
lib_ring_buffer_align_ctx(ctx, ltt_alignof(vppid));
chan->ops->event_write(ctx, &vppid, sizeof(vppid));
This page took
0.023575 seconds
and
4
git commands to generate.