From: Michal Simek <michal.simek@xilinx.com>
To: David Laight <David.Laight@ACULAB.COM>,
"'Wolfram Sang'" <wsa@kernel.org>,
"wu000273@umn.edu" <wu000273@umn.edu>
Cc: "kjlu@umn.edu" <kjlu@umn.edu>,
Michal Simek <michal.simek@xilinx.com>,
Rob Herring <robh@kernel.org>,
Shubhrajyoti Datta <shubhraj@xilinx.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i2c: xiic: Fix reference count leaks.
Date: Mon, 13 Jul 2020 09:54:05 +0200 [thread overview]
Message-ID: <0a43d56a-edb3-95f9-b8ba-f37bcecaae2d@xilinx.com> (raw)
In-Reply-To: <8aa8ee3d005f4a7e9a4dfa6654cc2732@AcuMS.aculab.com>
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
next prev parent reply other threads:[~2020-07-13 7:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-13 21:59 [PATCH] i2c: xiic: Fix reference count leaks wu000273
2020-06-14 9:09 ` Wolfram Sang
2020-06-17 14:30 ` David Laight
2020-07-13 7:54 ` Michal Simek [this message]
[not found] ` <CAMV6ehHR2+OSxj7rbWG_=ef2=aemecFk9u0yNSHN1keZZ3j5Bg@mail.gmail.com>
2020-07-21 6:02 ` Michal Simek
[not found] ` <CAMV6ehFtXcC-ba7RT95AC2bryh0E-9W1YYfkUBbZGDcLLL_6JA@mail.gmail.com>
2020-07-27 6:46 ` Michal Simek
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=0a43d56a-edb3-95f9-b8ba-f37bcecaae2d@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=David.Laight@ACULAB.COM \
--cc=kjlu@umn.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=shubhraj@xilinx.com \
--cc=wsa@kernel.org \
--cc=wu000273@umn.edu \
/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;
as well as URLs for NNTP newsgroup(s).