On Fri, 06 Jun 2014 07:35:17 +0900 Yoshihiro YUNOMAE <yoshihiro.yunomae...@hitachi.com> wrote:
> ftrace_trace_arrays links global_trace.list. However, global_trace is not > added > to ftrace_trace_arrays if trace_alloc_buffers() failed. As the result, > ftrace_trace_arrays becomes empty list. If ftrace_trace_arrays is empty list, > current top_trace_array() returns invalid pointer. As the result, the kernel > can induce memory corruption or panic. > > Current implementation does not check whether ftrace_trace_arrays is empty > list or not. So, in this patch, if ftrace_trace_arrays is empty list, > top_trace_array() returns NULL. Moreover, this patch makes all functions > calling > top_trace_array() handle it appropriately. As I'm still working on some more patches for 3.16, I can add this. It's not that critical, because if global_array fails to allocate on boot up, lots of other things may also break. -- Steve > > Signed-off-by: Yoshihiro YUNOMAE <yoshihiro.yunomae...@hitachi.com> > Cc: Steven Rostedt <rost...@goodmis.org> > Cc: Ingo Molnar <mi...@redhat.com> > Cc: linux-kernel@vger.kernel.org > --- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/