[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <797dd294ecd62b97647ad598058f158c50808f09.camel@mediatek.com>
Date: Mon, 10 Apr 2023 01:35:11 +0000
From: Tze-nan Wu (吳澤南)
<Tze-nan.Wu@...iatek.com>
To: "mhiramat@...nel.org" <mhiramat@...nel.org>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"bagasdotme@...il.com" <bagasdotme@...il.com>
CC: "linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"linux-trace-kernel@...r.kernel.org"
<linux-trace-kernel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Cheng-Jui Wang (王正睿)
<Cheng-Jui.Wang@...iatek.com>,
wsd_upstream <wsd_upstream@...iatek.com>,
Bobule Chang (張弘義)
<bobule.chang@...iatek.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>
Subject: Re: [PATCH v2] ring-buffer: Prevent inconsistent operation on
cpu_buffer->resize_disabled
Hi Bagas,
On Sun, 2023-04-09 at 19:30 +0700, Bagas Sanjaya wrote:
>
> On 4/9/23 09:46, Tze-nan Wu wrote:
> > This issue can be reproduced by "echo 0 > trace" and hotplug cpu at
> > the
> > same time. After reproducing success, we can find out
> > buffer_size_kb
> > will not be functional anymore.
> >
>
> Do you mean disabling tracing while hotplugging CPU? Or disabling
> both
> tracing and hotplug CPU?
>
I mean disabling tracing while hotplugging CPU, sorry for the
confusion here.
> > This patch uses cpus_read_lock() to prevent cpu_online_mask being
> > changed
> > between two different "for_each_online_buffer_cpu".
> >
>
> "Use cpu_read_lock() to prevent ..."
>
Thanks for the suggestion
> > Changes in v2:
> > Use cpus_read_lock() instead of copying cpu_online_mask at the
> > entry of
> > function
> >
>
Since I change to fix the issue by using cpus_read_lock(), we don't
need a copy of cpu_online_mask anymore, hence the two warnings will not
meet in the v2 patch.
> To resolve kernel test robot warnings ([1] and [2])? Or have they
> been fixed?
>
> [1]:
> https://lore.kernel.org/stable/202304081615.eiaqpbV8-lkp@intel.com/
> [2]:
> https://lore.kernel.org/stable/202304082051.Dp50upfS-lkp@intel.com/
>
> Thanks.
>
> --
> An old man doll... just what I always wanted! - Clara
>
Powered by blists - more mailing lists