Skip to contentSkip to conversation

Patch "tracing: Missing error code in tracer_alloc_buffers()" has been added to the 4.12-stable tree

PATCH [email protected] 1 participant 1 message Aug 27, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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 <[email protected]> know about it.

Quoted 1 line

From 147d88e0b5eb90191bc5c12ca0a3c410b75a13d2 Mon Sep 17 00:00:00 2001

From: Dan Carpenter <[email protected]>
Date: Tue, 1 Aug 2017 14:02:01 +0300
Subject: tracing: Missing error code in tracer_alloc_buffers()

From: Dan Carpenter <[email protected]>

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.

Cc Sebastian Andrzej Siewior <[email protected]>
Cc Ingo Molnar <[email protected]>
Fixes b32614c03413 ('tracing/rb: Convert to hotplug state machine')
---
 kernel/trace/trace.c |    1 +
 1 file changed, 1 insertion(+)
kernel/trace/trace.c +1 -0
@@ -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 [email protected] 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