From: Steven Rostedt <rostedt@goodmis.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andreas Schwab <schwab@suse.de>,
Daniel Bristot de Oliveira <bristot@kernel.org>,
jianchunfu <jianchunfu@cmss.chinamobile.com>
Subject: [GIT PULL] rtla: Updates for 5.20/6.0
Date: Wed, 3 Aug 2022 10:49:36 -0400 [thread overview]
Message-ID: <20220803104936.7df810fd@gandalf.local.home> (raw)
Linus,
Real Time Analysis Tool updates for 5.20 / 6.0
Changes to RTLA:
- Fix a double free
- Define syscall numbers for RISCV
- Fix Makefile when called from -C tools
- Use calloc() to check for memory allocation failures
Please pull the latest trace-rtla-v5.20 tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
trace-rtla-v5.20
Tag SHA1: ae546e8855f305db853d17a6509e267286dc5b2d
Head SHA1: dd0b15bda48f59eb7dee17fab91eda8389f0e98d
Andreas Schwab (2):
rtla: Fix double free
rtla: Define syscall numbers for riscv
Daniel Bristot de Oliveira (1):
rtla: Fix Makefile when called from -C tools/
jianchunfu (1):
rtla/utils: Use calloc and check the potential memory allocation failure
----
tools/tracing/rtla/Makefile | 2 +-
tools/tracing/rtla/src/trace.c | 9 +++++++--
tools/tracing/rtla/src/utils.c | 7 ++++---
3 files changed, 12 insertions(+), 6 deletions(-)
---------------------------
diff --git a/tools/tracing/rtla/Makefile b/tools/tracing/rtla/Makefile
index 3822f4ea5f49..1bea2d16d4c1 100644
--- a/tools/tracing/rtla/Makefile
+++ b/tools/tracing/rtla/Makefile
@@ -1,6 +1,6 @@
NAME := rtla
# Follow the kernel version
-VERSION := $(shell cat VERSION 2> /dev/null || make -sC ../../.. kernelversion)
+VERSION := $(shell cat VERSION 2> /dev/null || make -sC ../../.. kernelversion | grep -v make)
# From libtracefs:
# Makefiles suck: This macro sets a default value of $(2) for the
diff --git a/tools/tracing/rtla/src/trace.c b/tools/tracing/rtla/src/trace.c
index 5784c9f9e570..e1ba6d9f4265 100644
--- a/tools/tracing/rtla/src/trace.c
+++ b/tools/tracing/rtla/src/trace.c
@@ -134,13 +134,18 @@ void trace_instance_destroy(struct trace_instance *trace)
if (trace->inst) {
disable_tracer(trace->inst);
destroy_instance(trace->inst);
+ trace->inst = NULL;
}
- if (trace->seq)
+ if (trace->seq) {
free(trace->seq);
+ trace->seq = NULL;
+ }
- if (trace->tep)
+ if (trace->tep) {
tep_free(trace->tep);
+ trace->tep = NULL;
+ }
}
/*
diff --git a/tools/tracing/rtla/src/utils.c b/tools/tracing/rtla/src/utils.c
index 5352167a1e75..663a047f794d 100644
--- a/tools/tracing/rtla/src/utils.c
+++ b/tools/tracing/rtla/src/utils.c
@@ -106,8 +106,9 @@ int parse_cpu_list(char *cpu_list, char **monitored_cpus)
nr_cpus = sysconf(_SC_NPROCESSORS_CONF);
- mon_cpus = malloc(nr_cpus * sizeof(char));
- memset(mon_cpus, 0, (nr_cpus * sizeof(char)));
+ mon_cpus = calloc(nr_cpus, sizeof(char));
+ if (!mon_cpus)
+ goto err;
for (p = cpu_list; *p; ) {
cpu = atoi(p);
@@ -224,7 +225,7 @@ long parse_ns_duration(char *val)
#elif __arm__
# define __NR_sched_setattr 380
# define __NR_sched_getattr 381
-#elif __aarch64__
+#elif __aarch64__ || __riscv
# define __NR_sched_setattr 274
# define __NR_sched_getattr 275
#elif __powerpc__
next reply other threads:[~2022-08-03 14:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 14:49 Steven Rostedt [this message]
2022-08-05 16:40 ` [GIT PULL] rtla: Updates for 5.20/6.0 Linus Torvalds
2022-08-05 16:47 ` Steven Rostedt
2022-08-06 13:01 ` Daniel Bristot de Oliveira
2022-08-06 15:52 ` Linus Torvalds
2022-08-06 18:06 ` John Kacur
2022-08-06 18:22 ` Steven Rostedt
2022-08-06 18:24 ` Linus Torvalds
2022-08-06 18:51 ` Steven Rostedt
2022-08-06 19:05 ` Linus Torvalds
2022-08-06 19:23 ` Steven Rostedt
2022-08-06 18:45 ` Steven Rostedt
2022-08-06 18:47 ` Steven Rostedt
2022-08-05 17:42 ` pr-tracker-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220803104936.7df810fd@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bristot@kernel.org \
--cc=jianchunfu@cmss.chinamobile.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox