summaryrefslogtreecommitdiffstats
path: root/rust/helpers/task.c
diff options
context:
space:
mode:
authorLi Huafei <lihuafei1@huawei.com>2024-10-24 23:59:17 +0800
committerSteven Rostedt (Google) <rostedt@goodmis.org>2024-10-24 22:26:06 -0400
commitbd3734db86e01e20dd239a40b419059a0ce9c901 (patch)
treeb24f7bb0925bc56f8c0b40b005ee3f8d5aa276f0 /rust/helpers/task.c
parentfae4078c289a2f24229c0de652249948b1cd6bdb (diff)
downloadlinux-bd3734db86e01e20dd239a40b419059a0ce9c901.tar.gz
linux-bd3734db86e01e20dd239a40b419059a0ce9c901.tar.bz2
linux-bd3734db86e01e20dd239a40b419059a0ce9c901.zip
fgraph: Fix missing unlock in register_ftrace_graph()
Use guard(mutex)() to acquire and automatically release ftrace_lock, fixing the issue of not unlocking when calling cpuhp_setup_state() fails. Fixes smatch warning: kernel/trace/fgraph.c:1317 register_ftrace_graph() warn: inconsistent returns '&ftrace_lock'. Link: https://lore.kernel.org/20241024155917.1019580-1-lihuafei1@huawei.com Fixes: 2c02f7375e65 ("fgraph: Use CPU hotplug mechanism to initialize idle shadow stacks") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202410220121.wxg0olfd-lkp@intel.com/ Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Li Huafei <lihuafei1@huawei.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions