The patch titled rcu: trace fix possible mem-leak has been added to the -mm tree. Its filename is rcu-trace-fix-possible-mem-leak.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: rcu: trace fix possible mem-leak From: Steven Rostedt <rostedt@xxxxxxxxxxx> In the initialization of the RCU trace module, if rcupreempt_debugfs_init() fails, we never free the the trace buffer. This patch frees the trace buffer in case the debugfs fails. Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/rcupreempt_trace.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff -puN kernel/rcupreempt_trace.c~rcu-trace-fix-possible-mem-leak kernel/rcupreempt_trace.c --- a/kernel/rcupreempt_trace.c~rcu-trace-fix-possible-mem-leak +++ a/kernel/rcupreempt_trace.c @@ -308,11 +308,16 @@ out: static int __init rcupreempt_trace_init(void) { + int ret; + mutex_init(&rcupreempt_trace_mutex); rcupreempt_trace_buf = kmalloc(RCUPREEMPT_TRACE_BUF_SIZE, GFP_KERNEL); if (!rcupreempt_trace_buf) return 1; - return rcupreempt_debugfs_init(); + ret = rcupreempt_debugfs_init(); + if (ret) + kfree(rcupreempt_trace_buf); + return ret; } static void __exit rcupreempt_trace_cleanup(void) _ Patches currently in -mm which might be from rostedt@xxxxxxxxxxx are origin.patch rcu-just-rename-call_rcu_bh-instead-of-making-it-a-macro.patch rcu-trace-fix-possible-mem-leak.patch ftrace-new-continue-entry-separate-out-from-trace_entry.patch ftrace-printk-formatting-infrastructure.patch ftrace-printk-formatting-infrastructure-fix.patch ftrace-disable-function-tracing-bringing-up-new-cpu.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html