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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 23 May 2023 12:07:54 +0200
From:   Martin Kepplinger <martin.kepplinger@...i.sm>
To:     Sakari Ailus <sakari.ailus@....fi>
Cc:     laurent.pinchart@...asonboard.com, kernel@...i.sm,
        linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
        mchehab@...nel.org
Subject: Re: [PATCH v2] media: hi846: fix usage of pm_runtime_get_if_in_use()

Am Dienstag, dem 16.05.2023 um 16:22 +0300 schrieb Sakari Ailus:
> Hi Martin,
> 
> On Tue, Apr 25, 2023 at 11:47:47AM +0200, Martin Kepplinger wrote:
> > pm_runtime_get_if_in_use() does not only return nonzero values when
> > the device is in use, it can return a negative errno too.
> > 
> > And especially during resuming from system suspend, when runtime pm
> > is not yet up again, -EAGAIN is being returned, so the subsequent
> > pm_runtime_put() call results in a refcount underflow.
> > 
> > Fix system-resume by handling -EAGAIN of
> > pm_runtime_get_if_in_use().
> > 
> > Signed-off-by: Martin Kepplinger <martin.kepplinger@...i.sm>
> > ---
> > 
> > revision history
> > ----------------
> > v2 (thank you Sakari and Laurent):
> > * drop the other patch (the streaming-state in suspend/resume needs
> > to
> >   be solved differently).
> > * Sakari pointed out that many drivers are affected by this and
> > that
> >   runtime-pm might need changes instead. I think this patch doesn't
> > hurt
> >   and could serve as a reminder to do so.
> 
> I guess it's appropriate to add:
> 
> Fixes: e8c0882685f9 ("media: i2c: add driver for the SK Hynix Hi-846
> 8M pixel camera")
> 

I agree. Feel free to do so when applying.

                            martin


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ