From: Julia Lawall <julia.lawall@inria.fr>
To: Johan Hovold <johan@kernel.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
kernel-janitors@vger.kernel.org,
Gilles Muller <Gilles.Muller@inria.fr>,
Nicolas Palix <nicolas.palix@imag.fr>,
Michal Marek <michal.lkml@markovi.net>,
cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] coccinelle: api: semantic patch to use pm_runtime_resume_and_get
Date: Tue, 27 Apr 2021 15:44:25 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2104271542170.5173@hadrien> (raw)
In-Reply-To: <YIgPNRiaz2Jup+PT@hovoldconsulting.com>
On Tue, 27 Apr 2021, Johan Hovold wrote:
> On Mon, Apr 26, 2021 at 08:54:04PM +0200, Julia Lawall wrote:
> > pm_runtime_get_sync keeps a reference count on failure, which can lead
> > to leaks. pm_runtime_resume_and_get drops the reference count in the
> > failure case. This rule very conservatively follows the definition of
> > pm_runtime_resume_and_get to address the cases where the reference
> > count is unlikely to be needed in the failure case.
> >
> > pm_runtime_resume_and_get was introduced in
> > commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to
> > deal with usage counter")
> >
> > Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
>
> As I've said elsewhere, not sure trying to do a mass conversion of this
> is a good idea. People may not be used to the interface, but it is
> consistent and has its use. The recent flurry of conversions show that
> those also risk introducing new bugs in code that is currently tested
> and correct.
I looked some of the patches you commented on, and this rule would not
have transformed those cases. This rule is very restricted to ensure that
the transformed code follows the behavior of the new function.
>
> By giving the script kiddies another toy like this, the influx of broken
> patches is just bound to increase.
>
> Would also be good to CC the PM maintainer on this issue.
Sure, I can resend with Rafael in CC.
julia
next prev parent reply other threads:[~2021-04-27 13:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 18:54 Julia Lawall
2021-04-27 13:18 ` Johan Hovold
2021-04-27 13:22 ` Rafael J. Wysocki
2021-04-27 13:44 ` Julia Lawall [this message]
2021-04-27 15:01 ` Johan Hovold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2104271542170.5173@hadrien \
--to=julia.lawall@inria.fr \
--cc=Gilles.Muller@inria.fr \
--cc=cocci@systeme.lip6.fr \
--cc=johan@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=krzysztof.kozlowski@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nicolas.palix@imag.fr \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®