Re: [RFC] Hack to use mkdir/rmdir in debugfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2013-01-22 at 23:44 -0500, Steven Rostedt wrote:

> +	ret = event_trace_add_tracer(tr->dir, tr);
> +	if (ret)
> +		goto out_free_tr;
> +
> +	init_tracer_debugfs(tr, tr->dir);
> +
> +	mutex_unlock(&trace_types_lock);
> +
> +	list_add(&tr->list, &ftrace_trace_arrays);

I just noticed this bug :-)

The list_add() needs to be inside the mutex protection. This code use to
be within the trace_new_instance_write(), and I just moved it into its
own function. Must have been where I screwed up.

-- Steve

> +
> +	return 0;
> +
> + out_free_tr:
> +	if (tr->buffer)
> +		ring_buffer_free(tr->buffer);
> +	kfree(tr->name);
> +	kfree(tr);
> +
> + out_unlock:
> +	mutex_unlock(&trace_types_lock);
> +
> +	return ret;
> +
> +}
> +

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux