* [PATCH] tracing/histograms: Return an error if we fail to add histogram to hist_vars list
@ 2023-07-14 19:21 Mohamed Khalfella
2023-07-14 23:01 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Mohamed Khalfella @ 2023-07-14 19:21 UTC (permalink / raw)
To: mkhalfella
Cc: stable, Steven Rostedt, Masami Hiramatsu, open list:TRACING,
open list:TRACING
If the code fails to add histogram to hist_vars list, then ret should
contain error code before jumping to unregister histogram.
Cc: stable@vger.kernel.org
Fixes: 6018b585e8c6 ("tracing/histograms: Add histograms to hist_vars if they have referenced variables")
Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>
---
kernel/trace/trace_events_hist.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index c8c61381eba4..d06938ae0717 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -6668,7 +6668,8 @@ static int event_hist_trigger_parse(struct event_command *cmd_ops,
goto out_unreg;
if (has_hist_vars(hist_data) || hist_data->n_var_refs) {
- if (save_hist_vars(hist_data))
+ ret = save_hist_vars(hist_data);
+ if (ret)
goto out_unreg;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tracing/histograms: Return an error if we fail to add histogram to hist_vars list
2023-07-14 19:21 [PATCH] tracing/histograms: Return an error if we fail to add histogram to hist_vars list Mohamed Khalfella
@ 2023-07-14 23:01 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2023-07-14 23:01 UTC (permalink / raw)
To: Mohamed Khalfella
Cc: stable, Masami Hiramatsu, open list:TRACING, open list:TRACING
On Fri, 14 Jul 2023 19:21:43 +0000
Mohamed Khalfella <mkhalfella@purestorage.com> wrote:
> If the code fails to add histogram to hist_vars list, then ret should
> contain error code before jumping to unregister histogram.
Thanks, but I think I'm going to hold off till rc2 to push this through, to
see what else comes in, before I go back into running tests just to get
another fix as I send my pull request to Linus! ;-)
-- Steve
>
> Cc: stable@vger.kernel.org
> Fixes: 6018b585e8c6 ("tracing/histograms: Add histograms to hist_vars if
> they have referenced variables") Signed-off-by: Mohamed Khalfella
> <mkhalfella@purestorage.com> ---
> kernel/trace/trace_events_hist.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/trace/trace_events_hist.c
> b/kernel/trace/trace_events_hist.c index c8c61381eba4..d06938ae0717 100644
> --- a/kernel/trace/trace_events_hist.c
> +++ b/kernel/trace/trace_events_hist.c
> @@ -6668,7 +6668,8 @@ static int event_hist_trigger_parse(struct
> event_command *cmd_ops, goto out_unreg;
>
> if (has_hist_vars(hist_data) || hist_data->n_var_refs) {
> - if (save_hist_vars(hist_data))
> + ret = save_hist_vars(hist_data);
> + if (ret)
> goto out_unreg;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-14 23:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-14 19:21 [PATCH] tracing/histograms: Return an error if we fail to add histogram to hist_vars list Mohamed Khalfella
2023-07-14 23:01 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).