[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230530091330.e3nawo6ey2an4ir2@vireshk-i7>
Date: Tue, 30 May 2023 14:43:30 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Stephan Gerhold <stephan.gerhold@...nkonzept.com>
Cc: Viresh Kumar <vireshk@...nel.org>, Nishanth Menon <nm@...com>,
Stephen Boyd <sboyd@...nel.org>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] opp: Fix use-after-free in lazy_opp_tables after probe
deferral
On 30-05-23, 10:31, Stephan Gerhold wrote:
> Thanks, this seems to fix the crash as well. Are you going to handle it
> or should I send a v2 with this diff?
Please send a V2 :)
> During _allocate_opp_table() it's accessed without the opp_table_lock,
> because of
>
> /* Drop the lock to reduce the size of critical section */
> mutex_unlock(&opp_table_lock);
>
> if (opp_table) {
> /* ... */
> mutex_lock(&opp_table_lock);
> } else {
> opp_table = _allocate_opp_table(dev, index);
>
> mutex_lock(&opp_table_lock);
> /* ... */
> }
>
> This doesn't seem to cause any problems in my case though so it's
> unrelated to the crash I observed.
Hmm, right. Maybe we need a lock for that list, want to take that up ?
--
viresh
Powered by blists - more mailing lists