diff options
| author | Guenter Roeck <[email protected]> | 2025-09-06 05:06:18 +0000 |
|---|---|---|
| committer | Steven Rostedt (Google) <[email protected]> | 2025-09-06 16:12:38 +0000 |
| commit | ab1396af7595e7d49a3850481b24d7fe7cbdfd31 (patch) | |
| tree | 96859432f024c33409039527ad542bd53da49803 /drivers/cdx/controller/cdx_controller.c | |
| parent | ftrace/samples: Fix function size computation (diff) | |
| download | kernel-ab1396af7595e7d49a3850481b24d7fe7cbdfd31.tar.gz kernel-ab1396af7595e7d49a3850481b24d7fe7cbdfd31.zip | |
trace/fgraph: Fix error handling
Commit edede7a6dcd7 ("trace/fgraph: Fix the warning caused by missing
unregister notifier") added a call to unregister the PM notifier if
register_ftrace_graph() failed. It does so unconditionally. However,
the PM notifier is only registered with the first call to
register_ftrace_graph(). If the first registration was successful and
a subsequent registration failed, the notifier is now unregistered even
if ftrace graphs are still registered.
Fix the problem by only unregistering the PM notifier during error handling
if there are no active fgraph registrations.
Fixes: edede7a6dcd7 ("trace/fgraph: Fix the warning caused by missing unregister notifier")
Closes: https://lore.kernel.org/all/[email protected]/
Cc: Ye Weihua <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
Diffstat (limited to 'drivers/cdx/controller/cdx_controller.c')
0 files changed, 0 insertions, 0 deletions
