mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
tracing/histograms: Return an error if we fail to add histogram to hist_vars list
commit4b8b390516
upstream. Commit6018b585e8
("tracing/histograms: Add histograms to hist_vars if they have referenced variables") added a check to fail histogram creation if save_hist_vars() failed to add histogram to hist_vars list. But the commit failed to set ret to failed return code before jumping to unregister histogram, fix it. Link: https://lore.kernel.org/linux-trace-kernel/20230714203341.51396-1-mkhalfella@purestorage.com Cc: stable@vger.kernel.org Fixes:6018b585e8
("tracing/histograms: Add histograms to hist_vars if they have referenced variables") Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
78471c3ad3
commit
22f4093a42
1 changed files with 2 additions and 1 deletions
|
@ -5949,7 +5949,8 @@ static int event_hist_trigger_func(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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue