linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Duan <fugang.duan@nxp.com>
To: David Miller <davem@davemloft.net>,
	"navid.emamdoost@gmail.com" <navid.emamdoost@gmail.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"emamd001@umn.edu" <emamd001@umn.edu>,
	"wu000273@umn.edu" <wu000273@umn.edu>,
	"kjlu@umn.edu" <kjlu@umn.edu>,
	"mccamant@cs.umn.edu" <mccamant@cs.umn.edu>
Subject: RE: [EXT] Re: [PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails
Date: Tue, 16 Jun 2020 02:03:25 +0000	[thread overview]
Message-ID: <AM6PR0402MB3607327188F1F9178A7E5BFBFF9D0@AM6PR0402MB3607.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20200615.134216.1492983787088475104.davem@davemloft.net>

From: David Miller <davem@davemloft.net> Sent: Tuesday, June 16, 2020 4:42 AM
> From: Navid Emamdoost <navid.emamdoost@gmail.com>
> Date: Sun, 14 Jun 2020 00:38:01 -0500
> 
> > in fec_enet_mdio_read, fec_enet_mdio_write, fec_enet_get_regs,
> > fec_enet_open and fec_drv_remove, pm_runtime_get_sync is called which
> > increments the counter even in case of failure, leading to incorrect
> > ref count. In case of failure, decrement the ref count before returning.
> >
> > Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> 
> This does not apply to the net tree.

Wolfram Sang wonder if such de-reference can be better handled by pm runtime core code.
https://lkml.org/lkml/2020/6/14/76



      reply	other threads:[~2020-06-16  2:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14  5:38 [PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails Navid Emamdoost
2020-06-15 20:42 ` David Miller
2020-06-16  2:03   ` Andy Duan [this message]

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=AM6PR0402MB3607327188F1F9178A7E5BFBFF9D0@AM6PR0402MB3607.eurprd04.prod.outlook.com \
    --to=fugang.duan@nxp.com \
    --cc=davem@davemloft.net \
    --cc=emamd001@umn.edu \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mccamant@cs.umn.edu \
    --cc=navid.emamdoost@gmail.com \
    --cc=netdev@vger.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).