case LTTNG_KERNEL_CONTEXT_VPPID:
return lttng_add_vppid_to_ctx(ctx);
case LTTNG_KERNEL_CONTEXT_PERF_COUNTER:
- context_param.u.perf_counter.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ context_param.u.perf_counter.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
return lttng_add_perf_counter_to_ctx(context_param.u.perf_counter.type,
context_param.u.perf_counter.config,
context_param.u.perf_counter.name,
if (copy_from_user(&event_param, uevent_param, sizeof(event_param)))
return -EFAULT;
- event_param.name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ event_param.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
switch (event_param.instrumentation) {
case LTTNG_KERNEL_KRETPROBE:
- event_param.u.kretprobe.symbol_name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ event_param.u.kretprobe.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
break;
case LTTNG_KERNEL_KPROBE:
- event_param.u.kprobe.symbol_name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ event_param.u.kprobe.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
break;
case LTTNG_KERNEL_FUNCTION:
- event_param.u.ftrace.symbol_name[LTTNG_SYM_NAME_LEN - 1] = '\0';
+ event_param.u.ftrace.symbol_name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0';
break;
default:
break;
int ret = 0;
wrapper_vmalloc_sync_all();
- lttng_proc_dentry = proc_create_data("lttng", S_IWUSR, NULL,
+ lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL,
<tng_fops, NULL);
- if (lttng_proc_dentry) {
+ if (!lttng_proc_dentry) {
printk(KERN_ERR "Error creating LTTng control file\n");
ret = -ENOMEM;
goto error;