lkml.org 
[lkml]   [2020]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] i2c: xiic: Fix reference count leaks.
From
Date
Hi Qiushi,

On 17. 06. 20 16:30, David Laight wrote:
> From: Wolfram Sang
>> Sent: 14 June 2020 10:10
>>
>> On Sat, Jun 13, 2020 at 04:59:23PM -0500, wu000273@umn.edu wrote:
>>> From: Qiushi Wu <wu000273@umn.edu>
>>>
>>> pm_runtime_get_sync() increments the runtime PM usage counter even
>>> when it returns an error code. Thus call pm_runtime_put_noidle()
>>> if pm_runtime_get_sync() fails.
>>
>> Can you point me to a discussion where it was decided that this is a
>> proper fix? I'd think we rather should fix pm_runtime_get_sync() but
>> maybe there are technical reasons against it.
>
> Or, if there is one place that actually needs the reference split the
> code so that unusual case keeps the reference.
>
> In one of the patches I also spotted:
> ret = pm_runtime_get_sync();
> if (ret < 0 && ret != _EAGAIN)
> ...
>
> (I think it was EAGAIN.)
> I can't help feeling that is just wrong somewhere.

Qiushi: Any update on this one?

Thanks,
Michal

\
 
 \ /
  Last update: 2020-07-13 09:54    [W:0.452 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site