public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@kernel.org>
To: Aisheng Dong <aisheng.dong@nxp.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Fabio Estevam <festevam@gmail.com>,
	Andy Duan <fugang.duan@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	"khilman@kernel.org" <khilman@kernel.org>,
	"rjw@rjwysocki.net" <rjw@rjwysocki.net>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"kjlu@umn.edu" <kjlu@umn.edu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"wu000273@umn.edu" <wu000273@umn.edu>,
	Shawn Guo <shawnguo@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH] i2c: busses: Fix a reference count leak.
Date: Mon, 15 Jun 2020 09:06:47 +0200	[thread overview]
Message-ID: <20200615070647.GB1497@kunai> (raw)
In-Reply-To: <AM6PR04MB496688E213BDF2B104E5FCE1809C0@AM6PR04MB4966.eurprd04.prod.outlook.com>


[-- Attachment #1.1: Type: text/plain, Size: 1048 bytes --]

On Mon, Jun 15, 2020 at 06:31:28AM +0000, Aisheng Dong wrote:
> > From: Andy Duan <fugang.duan@nxp.com>
> > Sent: Monday, June 15, 2020 10:49 AM
> >
> > From: wu000273@umn.edu <wu000273@umn.edu> Sent: Sunday, June 14,
> > 2020 6:12 AM
> > > 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.
> > >
> > > Fixes: 13d6eb20fc79 ("i2c: imx-lpi2c: add runtime pm support")
> > > Signed-off-by: Qiushi Wu <wu000273@umn.edu>
> > 
> > Again, which case can trigger the issue ?
> 
> It's just error handling improvement because pm_runtime_get_sync() will increase the
> reference count even it's failed.
> 
> I wonder if such de-reference can be better handled by pm runtime core code.
> Copy pm guys to comment.

I started a seperate thread:

https://lkml.org/lkml/2020/6/14/76

Still, on-going discussion if the proper fix is to remove the error
check.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

       reply	other threads:[~2020-06-15  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM6PR04MB496688E213BDF2B104E5FCE1809C0@AM6PR04MB4966.eurprd04.prod.outlook.com>
2020-06-15  7:06 ` Wolfram Sang [this message]
2020-06-13 22:12 [PATCH] i2c: busses: Fix a reference count leak wu000273

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=20200615070647.GB1497@kunai \
    --to=wsa@kernel.org \
    --cc=aisheng.dong@nxp.com \
    --cc=festevam@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=kernel@pengutronix.de \
    --cc=khilman@kernel.org \
    --cc=kjlu@umn.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=ulf.hansson@linaro.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