tracing/histograms: Return an error if we fail to add histogram to hist_vars list
stable inclusion from stable-v5.10.188 commit 43e786aa51b80e5856c8f1c4ad46a5784364ebe6 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8KYFP Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=43e786aa51b80e5856c8f1c4ad46a5784364ebe6 -------------------------------- commit 4b8b3905 upstream. Commit 6018b585 ("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: 6018b585 ("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> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment