summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-01-29 18:42:34 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2024-01-29 18:42:34 -0800
commit9b7bd05bebfcd3d369272d41ef32a379708ec933 (patch)
tree5b23475751bc5498f27eb238d653d33aebe8fb42 /kernel
parent6f3d7d5cedbad7a859bb34161a2807c58e6cdda8 (diff)
parent29142dc92c37d3259a33aef15b03e6ee25b0d188 (diff)
downloadlinux-stable-9b7bd05bebfcd3d369272d41ef32a379708ec933.tar.gz
linux-stable-9b7bd05bebfcd3d369272d41ef32a379708ec933.tar.bz2
linux-stable-9b7bd05bebfcd3d369272d41ef32a379708ec933.zip
Merge tag 'trace-v6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull tracing fixes from Steven Rostedt: "Two small fixes for tracefs and eventfs: - Fix register_snapshot_trigger() on allocation error If the snapshot fails to allocate, the register_snapshot_trigger() can still return success. If the call to tracing_alloc_snapshot_instance() returned anything but 0, it returned 0, but it should have been returning the error code from that allocation function. - Remove leftover code from tracefs doing a dentry walk on remount. The update_gid() function was called by the tracefs code on remount to update the gid of eventfs, but that is no longer the case, but that code wasn't deleted. Nothing calls it. Remove it" * tag 'trace-v6.8-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace: tracefs: remove stale 'update_gid' code tracing/trigger: Fix to return error if failed to alloc snapshot
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace_events_trigger.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
index 46439e3bcec4..b33c3861fbbb 100644
--- a/kernel/trace/trace_events_trigger.c
+++ b/kernel/trace/trace_events_trigger.c
@@ -1470,8 +1470,10 @@ register_snapshot_trigger(char *glob,
struct event_trigger_data *data,
struct trace_event_file *file)
{
- if (tracing_alloc_snapshot_instance(file->tr) != 0)
- return 0;
+ int ret = tracing_alloc_snapshot_instance(file->tr);
+
+ if (ret < 0)
+ return ret;
return register_trigger(glob, data, file);
}