Skip to content

Commit a586a55

Browse files
committed
Merge: tracing/trigger: Fix to return error if failed to alloc snapshot
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4634 JIRA: https://issues.redhat.com/browse/RHEL-33284 CVE: CVE-2024-26920 Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Approved-by: Artem Savkov <asavkov@redhat.com> Approved-by: John B. Wyatt IV <jwyatt@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents ea6a6a8 + 091aaf3 commit a586a55

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kernel/trace/trace_events_trigger.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,8 +1108,10 @@ register_snapshot_trigger(char *glob, struct event_trigger_ops *ops,
11081108
struct event_trigger_data *data,
11091109
struct trace_event_file *file)
11101110
{
1111-
if (tracing_alloc_snapshot_instance(file->tr) != 0)
1112-
return 0;
1111+
int ret = tracing_alloc_snapshot_instance(file->tr);
1112+
1113+
if (ret < 0)
1114+
return ret;
11131115

11141116
return register_trigger(glob, ops, data, file);
11151117
}

0 commit comments

Comments
 (0)