lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6a676161-e948-9afc-296b-ccd1df202e36@gmail.com>
Date:   Thu, 30 Apr 2020 16:24:19 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Sowjanya Komatineni <skomatineni@...dia.com>,
        thierry.reding@...il.com, jonathanh@...dia.com, frankc@...dia.com,
        hverkuil@...all.nl
Cc:     linux-media@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v1 3/5] media: tegra-video: Move PM runtime handle to
 streaming

28.04.2020 19:04, Dmitry Osipenko пишет:
...
>>>>>>>> +             ret = pm_runtime_get_sync(csi->dev);
>>>>>>>> +             if (ret < 0) {
>>>>>>>> +                     dev_err(csi->dev,
>>>>>>>> +                             "failed to get runtime PM: %d\n",
>>>>>>>> ret);
>>>>>>>> +                     pm_runtime_put_noidle(csi->dev);
>>> Why this pm_runtime_put_noidle() is needed? This should be wrong, please
>>> remove it.
>>
>> pm_runtime_get_sync() increments power.usage_count prior to rpm_resume
>>
>> if rpm_resume fails it does not decrement usage_count.
>>
>> So to balance count on failure, calling pm_runtime_put_noidle()
> 
> Hmm.. maybe you're right. I'll need to take a more detailed look.
> 

I checked the RPM's use-count after error condition and yours variant is
correct. Perhaps we should start correcting all other Tegra drivers that
do not handle the RPM error properly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ