Merge tag 'ftrace-v6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull ftrace fixes from Steven Rostedt:

- Fix missing mutex unlock in error path of register_ftrace_graph()

A previous fix added a return on an error path and forgot to unlock
the mutex. Instead of dealing with error paths, use guard(mutex) as
the mutex is just released at the exit of the function anyway. Other
functions in this file should be updated with this, but that's a
cleanup and not a fix.

- Change cpuhp setup name to be consistent with other cpuhp states

The same fix that the above patch fixes added a cpuhp_setup_state()
call with the name of "fgraph_idle_init". I was informed that it
should instead be something like: "fgraph:online". Update that too.

* tag 'ftrace-v6.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
fgraph: Change the name of cpuhp state to "fgraph:online"
fgraph: Fix missing unlock in register_ftrace_graph()

Changed files
+4 -8
kernel
trace
+4 -8
kernel/trace/fgraph.c
··· 1252 1252 int ret = 0; 1253 1253 int i = -1; 1254 1254 1255 - mutex_lock(&ftrace_lock); 1255 + guard(mutex)(&ftrace_lock); 1256 1256 1257 1257 if (!fgraph_initialized) { 1258 - ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "fgraph_idle_init", 1258 + ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "fgraph:online", 1259 1259 fgraph_cpu_init, NULL); 1260 1260 if (ret < 0) { 1261 1261 pr_warn("fgraph: Error to init cpu hotplug support\n"); ··· 1273 1273 } 1274 1274 1275 1275 i = fgraph_lru_alloc_index(); 1276 - if (i < 0 || WARN_ON_ONCE(fgraph_array[i] != &fgraph_stub)) { 1277 - ret = -ENOSPC; 1278 - goto out; 1279 - } 1276 + if (i < 0 || WARN_ON_ONCE(fgraph_array[i] != &fgraph_stub)) 1277 + return -ENOSPC; 1280 1278 gops->idx = i; 1281 1279 1282 1280 ftrace_graph_active++; ··· 1311 1313 gops->saved_func = NULL; 1312 1314 fgraph_lru_release_index(i); 1313 1315 } 1314 - out: 1315 - mutex_unlock(&ftrace_lock); 1316 1316 return ret; 1317 1317 } 1318 1318