[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1ee8f429-bc79-c984-29a2-f131c750551f@redhat.com>
Date: Tue, 27 Sep 2022 13:52:31 -0400
From: Waiman Long <longman@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Boqun Feng <boqun.feng@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [Resend PATCH v2] tracing: Disable interrupt or preemption before
acquiring arch_spinlock_t
On 9/27/22 13:12, Steven Rostedt wrote:
> On Tue, 27 Sep 2022 11:28:13 -0400
> Waiman Long <longman@...hat.com> wrote:
>
>> On 9/22/22 10:56, Waiman Long wrote:
>>> It was found that some tracing functions in kernel/trace/trace.c acquire
>>> an arch_spinlock_t with preemption and irqs enabled. An example is the
>>> tracing_saved_cmdlines_size_read() function which intermittently causes
>>> a "BUG: using smp_processor_id() in preemptible" warning when the LTP
>>> read_all_proc test is run.
>>>
>>> That can be problematic in case preemption happens after acquiring the
>>> lock. Add the necessary preemption or interrupt disabling code in the
>>> appropriate places before acquiring an arch_spinlock_t.
>>>
>>> The convention here is to disable preemption for trace_cmdline_lock and
>>> interupt for max_lock.
>>>
>>> Fixes: a35873a0993b ("tracing: Add conditional snapshot")
>>> Fixes: 939c7a4f04fc ("tracing: Introduce saved_cmdlines_size file")
>>> Suggested-by: Steven Rostedt <rostedt@...dmis.org>
>>> Signed-off-by: Waiman Long <longman@...hat.com>
>>> ---
>>> kernel/trace/trace.c | 23 +++++++++++++++++++++++
>>> 1 file changed, 23 insertions(+)
>> Ping!
>>
>> Any comment on this patch?
> You may have noticed (from today's emailing) I applied the patch ;-)
Yes, I saw it after I sent this mail :-)
Thanks,
Longman
Powered by blists - more mailing lists