X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-context-vpid.c;fp=lttng-context-vpid.c;h=3f16e03a6d996992107cbfe6eac19bb2e52dbf76;hb=90f96adf9b02ecdb8c982bfda64fbfd4b11c34a8;hp=f12eb97efebe25bbae9355320a3d9e5a16da0577;hpb=88dfd89924114cc8948c300cbd6afd3503ec0b23;p=lttng-modules.git diff --git a/lttng-context-vpid.c b/lttng-context-vpid.c index f12eb97e..3f16e03a 100644 --- a/lttng-context-vpid.c +++ b/lttng-context-vpid.c @@ -32,7 +32,13 @@ void vpid_record(struct lttng_ctx_field *field, { pid_t vpid; - vpid = task_tgid_vnr(current); + /* + * nsproxy can be NULL when scheduled out of exit. + */ + if (!current->nsproxy) + vpid = 0; + else + vpid = task_tgid_vnr(current); lib_ring_buffer_align_ctx(ctx, ltt_alignof(vpid)); chan->ops->event_write(ctx, &vpid, sizeof(vpid)); }