Commit bd3734d
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/[email protected]
Fixes: 2c02f73 ("fgraph: Use CPU hotplug mechanism to initialize idle shadow stacks")
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Closes: https://lore.kernel.org/r/[email protected]/
Suggested-by: Steven Rostedt <[email protected]>
Signed-off-by: Li Huafei <[email protected]>
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent fae4078 commit bd3734d
1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1252 | 1252 | | |
1253 | 1253 | | |
1254 | 1254 | | |
1255 | | - | |
| 1255 | + | |
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
| |||
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
1276 | | - | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
| 1276 | + | |
| 1277 | + | |
1280 | 1278 | | |
1281 | 1279 | | |
1282 | 1280 | | |
| |||
1313 | 1311 | | |
1314 | 1312 | | |
1315 | 1313 | | |
1316 | | - | |
1317 | | - | |
1318 | 1314 | | |
1319 | 1315 | | |
1320 | 1316 | | |
| |||
0 commit comments