RE: [EXT] Re: [PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails

2020-06-15 Thread Andy Duan
From: David Miller Sent: Tuesday, June 16, 2020 4:42 AM > From: Navid Emamdoost > 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 i

Re: [PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails

2020-06-15 Thread David Miller
From: Navid Emamdoost 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 failu

Re: [PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails

2020-06-14 Thread Greg KH
On Sun, Jun 14, 2020 at 10:25:38AM +0200, Markus Elfring wrote: > > in fec_enet_mdio_read, … > > I am curious under which circumstances you would like to improve > such commit messages. > > * Will the tag “Fixes” become helpful? > > * Which source code analysis tools did trigger to send > upda

Re: [PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails

2020-06-14 Thread Markus Elfring
> in fec_enet_mdio_read, … I am curious under which circumstances you would like to improve such commit messages. * Will the tag “Fixes” become helpful? * Which source code analysis tools did trigger to send update suggestions according to 16 similar issues for today? … > +++ b/drivers/net/e

[PATCH] net: fec: fix ref count leaking when pm_runtime_get_sync fails

2020-06-13 Thread Navid Emamdoost
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 Em