Messages in this thread | | | Date | Wed, 21 Sep 2022 22:08:00 -0400 | From | Steven Rostedt <> | Subject | Re: [PATCH 2/2] tracing: Use proper do_arch_spin_lock() API |
| |
On Wed, 21 Sep 2022 21:48:41 -0400 Waiman Long <longman@redhat.com> wrote:
> On 9/21/22 18:17, Steven Rostedt wrote: > >> savedcmd_temp = savedcmd; > >> savedcmd = s; > >> - arch_spin_unlock(&trace_cmdline_lock); > >> + do_arch_spin_unlock(&trace_cmdline_lock); > >> free_saved_cmdlines_buffer(savedcmd_temp); > >> > >> return 0; > >> @@ -6373,10 +6369,10 @@ int tracing_set_tracer(struct trace_array *tr, const char *buf) > >> > >> #ifdef CONFIG_TRACER_SNAPSHOT > >> if (t->use_max_tr) { > >> - arch_spin_lock(&tr->max_lock); > >> + do_arch_spin_lock(&tr->max_lock); > > Add preemption disabling. > > > The pattern that I have seen so far is to disable preemption for > trace_cmdline_lock, but interrupt for max_lock. So should we also > disable interrupt here instead of preemption? >
Ah yes.
Thanks,
-- Steve
| |