Commit 21581dd
tracing: Ensure module defining synth event cannot be unloaded while tracing
Currently, using synth_event_delete() will fail if the event is being
used (tracing in progress), but that is normally done in the module exit
function. At that stage, failing is problematic as returning a non-zero
status means the module will become locked (impossible to unload or
reload again).
Instead, ensure the module exit function does not get called in the
first place by increasing the module refcnt when the event is enabled.
Cc: [email protected]
Cc: Mathieu Desnoyers <[email protected]>
Fixes: 35ca520 ("tracing: Add synthetic event command generation functions")
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Douglas Raillard <[email protected]>
Acked-by: Masami Hiramatsu (Google) <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>1 parent 0c588ac commit 21581dd
1 file changed
+29
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
855 | 883 | | |
856 | 884 | | |
857 | 885 | | |
| |||
881 | 909 | | |
882 | 910 | | |
883 | 911 | | |
884 | | - | |
| 912 | + | |
885 | 913 | | |
886 | 914 | | |
887 | 915 | | |
| |||
0 commit comments