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