On Tue,  7 Jul 2015 18:10:42 +0800
Chunyan Zhang <[email protected]> wrote:

> +static int alloc_stm_trace_buffer(void)
> +{
> +     struct trace_buffer_stm *buffer;
> +
> +     buffer = kzalloc(sizeof(struct trace_buffer_stm), GFP_KERNEL);
> +     if (!buffer)
> +             return -ENOMEM;
> +
> +     buffer->used_len = 0;
> +     buffer->size = ARRAY_SIZE(buffer->buffer);
> +
> +     trace_event_stm_buffer = buffer;
> +
> +     return 0;
> +}
> +
> +static __init int trace_stm_init_buffers(void)
> +{
> +     if (alloc_stm_trace_buffer())
> +             return -ENOMEM;
> +
> +     if (alloc_stm_tmp_seq())

This needs to free trace_event_stm_buffer.

-- Steve

> +             return -ENOMEM;
> +
> +     stm_buffers_allocated = 1;
> +
> +     return 0;
> +}
> +fs_initcall(trace_stm_init_buffers);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to