From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:45700 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751330AbdH0Mz1 (ORCPT ); Sun, 27 Aug 2017 08:55:27 -0400 Subject: Patch "tracing: Missing error code in tracer_alloc_buffers()" has been added to the 4.12-stable tree To: dan.carpenter@oracle.com, bigeasy@linutronix.de, gregkh@linuxfoundation.org, mingo@redhat.com, rostedt@goodmis.org Cc: , From: Date: Sun, 27 Aug 2017 14:55:16 +0200 Message-ID: <15038385163255@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled tracing: Missing error code in tracer_alloc_buffers() to the 4.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: tracing-missing-error-code-in-tracer_alloc_buffers.patch and it can be found in the queue-4.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 147d88e0b5eb90191bc5c12ca0a3c410b75a13d2 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 1 Aug 2017 14:02:01 +0300 Subject: tracing: Missing error code in tracer_alloc_buffers() From: Dan Carpenter commit 147d88e0b5eb90191bc5c12ca0a3c410b75a13d2 upstream. If ring_buffer_alloc() or one of the next couple function calls fail then we should return -ENOMEM but the current code returns success. Link: http://lkml.kernel.org/r/20170801110201.ajdkct7vwzixahvx@mwanda Cc: Sebastian Andrzej Siewior Cc: Ingo Molnar Fixes: b32614c03413 ('tracing/rb: Convert to hotplug state machine') Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Greg Kroah-Hartman --- kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+) --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -8110,6 +8110,7 @@ __init static int tracer_alloc_buffers(v if (ret < 0) goto out_free_cpumask; /* Used for event triggers */ + ret = -ENOMEM; temp_buffer = ring_buffer_alloc(PAGE_SIZE, RB_FL_OVERWRITE); if (!temp_buffer) goto out_rm_hp_state; Patches currently in stable-queue which might be from dan.carpenter@oracle.com are queue-4.12/tracing-missing-error-code-in-tracer_alloc_buffers.patch queue-4.12/mm-shmem-fix-handling-sys-kernel-mm-transparent_hugepage-shmem_enabled.patch