Masami Hiramatsu
fc800a10be
tracing: Lock event_mutex before synth_event_mutex
...
synthetic event is using synth_event_mutex for protecting
synth_event_list, and event_trigger_write() path acquires
locks as below order.
event_trigger_write(event_mutex)
->trigger_process_regex(trigger_cmd_mutex)
->event_hist_trigger_func(synth_event_mutex)
On the other hand, synthetic event creation and deletion paths
call trace_add_event_call() and trace_remove_event_call()
which acquires event_mutex. In that case, if we keep the
synth_event_mutex locked while registering/unregistering synthetic
events, its dependency will be inversed.
To avoid this issue, current synthetic event is using a 2 phase
process to create/delete events. For example, it searches existing
events under synth_event_mutex to check for event-name conflicts, and
unlocks synth_event_mutex, then registers a new event under event_mutex
locked. Finally, it locks synth_event_mutex and tries to add the
new event to the list. But it can introduce complexity and a chance
for name conflicts.
To solve this simpler, this introduces trace_add_event_call_nolock()
and trace_remove_event_call_nolock() which don't acquire
event_mutex inside. synthetic event can lock event_mutex before
synth_event_mutex to solve the lock dependency issue simpler.
Link: http://lkml.kernel.org/r/154140844377.17322.13781091165954002713.stgit@devbox
Reviewed-by: Tom Zanussi <tom.zanussi@linux.intel.com >
Tested-by: Tom Zanussi <tom.zanussi@linux.intel.com >
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org >
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
2018-12-08 20:54:09 -05:00
..
2018-10-08 11:40:43 +02:00
2018-10-31 10:57:43 -07:00
2018-11-08 17:51:11 +01:00
2018-10-18 15:41:21 -07:00
2018-10-10 13:47:06 +02:00
2018-10-16 11:13:50 +02:00
2018-10-26 10:50:10 -07:00
2018-10-23 08:45:05 +01:00
2018-10-25 17:57:35 -07:00
2018-10-31 16:47:55 -07:00
2018-10-26 07:38:19 -07:00
2018-10-08 11:40:43 +02:00
2018-11-06 17:40:31 +01:00
2018-11-03 13:27:50 +01:00
2018-10-12 15:25:17 +01:00
2018-10-26 08:14:13 -07:00
2018-11-01 08:42:21 -07:00
2018-10-26 07:38:19 -07:00
2018-10-30 09:08:07 -07:00
2018-10-02 10:11:12 +02:00
2018-10-21 17:00:17 +01:00
2018-11-04 08:20:09 -08:00
2018-10-26 08:14:13 -07:00
2018-10-25 06:50:48 -07:00
2018-10-31 19:24:21 +01:00
2018-10-03 16:47:43 +02:00
2018-11-01 19:59:53 -06:00
2018-10-31 08:54:12 -07:00
2018-10-15 15:43:06 +02:00
2018-11-01 19:59:53 -06:00
2018-11-01 19:59:53 -06:00
2018-10-15 20:05:18 -06:00
2018-10-25 11:17:40 -06:00
2018-10-19 13:24:31 -07:00
2018-10-31 16:53:17 -07:00
2018-10-01 16:18:32 +02:00
2018-10-19 13:24:31 -07:00
2018-10-02 22:20:50 -04:00
2018-10-26 16:26:32 -07:00
2018-11-02 11:25:48 -07:00
2018-10-03 15:29:15 +03:00
2018-10-18 15:43:38 -07:00
2018-10-25 11:14:36 -07:00
2018-11-03 23:42:16 +01:00
2018-11-08 11:33:52 +01:00
2018-11-06 15:30:16 +01:00
2018-09-30 20:14:03 +02:00
2018-11-05 08:14:18 -08:00
2018-09-30 20:14:03 +02:00
2018-11-05 08:14:18 -08:00
2018-10-03 16:47:43 +02:00
2018-11-02 19:39:54 +01:00
2018-10-04 10:23:37 +02:00
2018-10-06 12:09:26 +02:00
2018-10-08 22:53:10 +11:00
2018-10-19 07:53:18 +02:00
2018-10-26 16:26:32 -07:00
2018-10-02 10:16:41 +09:00
2018-10-26 12:57:38 -07:00
2018-10-26 08:42:25 -07:00
2018-10-08 09:44:17 +02:00
2018-10-19 08:43:46 +02:00
2018-10-09 15:08:26 +02:00
2018-10-04 09:40:52 -07:00
2018-11-15 10:04:46 +01:00
2018-10-22 17:54:47 -07:00
2018-10-08 13:48:45 +02:00
2018-10-25 17:11:42 -07:00
2018-11-02 09:33:08 -07:00
2018-10-04 13:28:02 +02:00
2018-12-08 20:54:07 -05:00
2018-10-01 08:58:57 -06:00
2018-11-03 10:09:37 -07:00
2018-11-06 13:59:08 +01:00
2018-10-31 08:54:12 -07:00
2018-10-26 16:38:15 -07:00
2018-10-05 16:32:04 -07:00
2018-10-05 10:16:56 +08:00
2018-10-10 20:37:13 -07:00
2018-11-04 11:04:46 +01:00
2018-10-21 10:46:33 -04:00
2018-10-11 16:01:00 +02:00
2018-10-29 20:26:06 -07:00
2018-10-10 20:40:21 -07:00
2018-10-09 07:50:41 +02:00
2018-10-26 16:25:18 -07:00
2018-10-10 18:09:37 +02:00
2018-10-02 12:00:08 +01:00
2018-10-26 09:30:46 +01:00
2018-10-26 09:30:46 +01:00
2018-10-11 21:55:58 +02:00
2018-10-09 08:25:07 -06:00
2018-10-26 16:25:18 -07:00
2018-10-01 22:55:36 -07:00
2018-10-10 15:20:54 -05:00
2018-10-09 09:56:33 +02:00
2018-10-24 11:49:35 +01:00
2018-10-26 16:25:19 -07:00
2018-10-31 08:54:16 -07:00
2018-10-26 16:26:35 -07:00
2018-10-31 08:54:17 -07:00
2018-11-03 10:09:37 -07:00
2018-10-17 12:18:16 -05:00
2018-10-19 17:02:23 -07:00
2018-10-01 22:55:36 -07:00
2018-11-09 06:30:44 -06:00
2018-10-26 16:25:19 -07:00
2018-10-31 08:54:14 -07:00
2018-10-24 11:49:35 +01:00
2018-10-16 00:13:39 -07:00
2018-10-02 11:16:38 +01:00
2018-10-17 13:56:58 -07:00
2018-11-03 15:40:01 -07:00
2018-10-16 00:13:12 -07:00
2018-10-19 17:01:43 -07:00
2018-09-30 15:35:17 -04:00
2018-09-30 15:35:17 -04:00
2018-09-30 15:35:17 -04:00
2018-11-06 21:58:00 +01:00
2018-11-03 10:09:37 -07:00
2018-10-01 14:16:13 -07:00
2018-10-29 10:42:20 -07:00
2018-10-26 16:26:34 -07:00
2018-10-21 10:46:35 -04:00
2018-10-21 10:46:39 -04:00
2018-10-25 06:50:48 -07:00
2018-10-10 15:47:00 -05:00
2018-10-17 12:18:17 -05:00
2018-10-25 06:50:48 -07:00
2018-10-31 08:54:14 -07:00
2018-10-26 16:26:35 -07:00
2018-10-01 23:14:10 -07:00
2018-10-18 12:25:10 +02:00
2018-10-08 22:53:10 +11:00
2018-10-03 16:47:43 +02:00
2018-10-26 16:26:32 -07:00
2018-10-26 16:26:32 -07:00
2018-10-22 07:11:58 -07:00
2018-10-24 11:22:39 +01:00
2018-10-11 15:28:04 +01:00
2018-10-13 20:31:37 +03:00
2018-10-21 10:46:48 -04:00
2018-10-31 08:54:13 -07:00
2018-10-21 12:07:26 +01:00
2018-10-19 12:53:55 -07:00
2018-10-04 11:36:07 +02:00
2018-12-08 20:54:08 -05:00
2018-11-27 20:31:54 -05:00
2018-10-03 16:47:43 +02:00
2018-10-04 09:57:45 -07:00
2018-10-02 14:38:02 -07:00
2018-10-03 16:50:39 +02:00
2018-10-31 08:54:14 -07:00
2018-10-17 22:31:30 -07:00
2018-10-20 21:37:11 +02:00
2018-10-26 16:26:31 -07:00
2018-10-09 16:51:11 +02:00
2018-10-09 11:20:55 +02:00
2018-10-11 12:12:55 +02:00
2018-10-12 12:35:02 +02:00
2018-10-28 11:35:40 -07:00
2018-10-19 08:48:28 +02:00
2018-10-11 09:16:44 -07:00
2018-10-15 22:56:41 -07:00
2018-10-02 15:52:08 -07:00
2018-10-25 11:14:36 -07:00
2018-12-08 20:54:09 -05:00
2018-10-17 15:35:29 -04:00
2018-11-29 22:08:38 -05:00
2018-10-13 00:50:53 -04:00
2018-10-24 00:41:07 +01:00
2018-10-22 19:37:36 -07:00
2018-10-04 22:23:15 -07:00
2018-10-16 00:11:13 -04:00
2018-11-01 19:59:53 -06:00
2018-10-21 10:46:46 -04:00