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  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:   Sun, 14 Jun 2020 13:44:35 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Wolfram Sang <wsa@...nel.org>, Linux PM <linux-pm@...r.kernel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-i2c <linux-i2c@...r.kernel.org>
Subject: Re: RFC: a failing pm_runtime_get increases the refcnt?

On Sun, Jun 14, 2020 at 1:05 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> On Sun, Jun 14, 2020 at 12:00 PM Geert Uytterhoeven
> <geert@...ux-m68k.org> wrote:
> > On Sun, Jun 14, 2020 at 11:43 AM Andy Shevchenko
> > <andy.shevchenko@...il.com> wrote:
> > > On Sun, Jun 14, 2020 at 12:34 PM Andy Shevchenko
> > > <andy.shevchenko@...il.com> wrote:
> > > >
> > > > On Sun, Jun 14, 2020 at 12:10 PM Wolfram Sang <wsa@...nel.org> wrote:
> > > > > both in the I2C subsystem and also for Renesas drivers I maintain, I am
> > > > > starting to get boilerplate patches doing some pm_runtime_put_* variant
> > > > > because a failing pm_runtime_get is supposed to increase the ref
> > > > > counters? Really? This feels wrong and unintuitive to me.
> > > >
> > > > Yeah, that is a well known issue with PM (I even have for a long time
> > > > a coccinelle script, when I realized myself that there are a lot of
> > > > cases like this, but someone else discovered this recently, like
> > > > opening a can of worms).
> > > >
> > > > > I expect there
> > > > > has been a discussion around it but I couldn't find it.
> > > >
> > > > Rafael explained (again) recently this. I can't find it quickly, unfortunately.
> > >
> > > I _think_ this discussion, but may be it's simple another tentacle of
> > > the same octopus.
> > > https://patchwork.ozlabs.org/project/linux-tegra/patch/20200520095148.10995-1-dinghao.liu@zju.edu.cn/
> >
> > Thanks, hadn't read that one! (so I was still at -1 from
> > http://sweng.the-davies.net/Home/rustys-api-design-manifesto ;-)
> >
> > So "pm_runtime_put_noidle()" is the (definitive?) one to pair with a
> > pm_runtime_get_sync() failure?
>
> My biggest worry here is all those copycats jumping on the bandwagon,
> and sending untested[*] patches that end up calling the wrong function.
>
> [*] Several of them turned out to introduce trivial compile warnings, so
>     I now consider all patches authored by the same person as untested.

That's always a problem with janitors like patches...
Once I tried to ask them to provide a testing material, but...
 - some maintainers just accept them without asking questions
 - some maintainers even defend them that they are doing a good job
(and LWN top contributor statistics also motivate some of janitors,
though I consider it not the best metrics)
 - practically almost no contributor answered to my queries, so, I
consider all of them are untested independent to the name (if name
appears in more than dozen patches, esp. in different subsystems)
 - and yes, it's a trade-off, some of the patches indeed useful.


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists