lkml.org 
[lkml]   [2022]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpufreq: mediatek: Fix potential deadlock problem in mtk_cpufreq_set_target
On 10-05-22, 16:26, Jiabing Wan wrote:
> Hi, Viresh Kumar
>
> On 2022/5/10 16:12, Viresh Kumar wrote:
> > On 10-05-22, 16:01, Wan Jiabing wrote:
> > > Fix following coccichek error:
> > > ./drivers/cpufreq/mediatek-cpufreq.c:199:2-8: preceding lock on line
> > > ./drivers/cpufreq/mediatek-cpufreq.c:208:2-8: preceding lock on line
> > >
> > > mutex_lock is acquired but not released before return.
> > > Use 'goto out' to help releasing the mutex_lock.
> > >
> > > Fixes: c210063b40ac ("cupful: mediatek: Add opp notification support")
> > cupful ??
>
> Sorry for the typo...

Did you write this line by hand or generate it with Git ? There shouldn't be a
typo here.

> By the way, is this patch correct?
>
> I am not sure whether it should return with the mutex_lock.
> But IMO, it should release the lock before return.

Yes, we need to release the lock.

--
viresh

\
 
 \ /
  Last update: 2022-05-10 10:52    [W:1.064 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site