[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201201092924.112461-1-miaoqinglang@huawei.com>
Date: Tue, 1 Dec 2020 17:29:24 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Michal Simek <michal.simek@...inx.com>,
Dong Aisheng <aisheng.dong@....com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Oleksij Rempel <linux@...pel-privat.de>,
Vignesh R <vigneshr@...com>,
"Aaro Koskinen" <aaro.koskinen@....fi>,
Tony Lindgren <tony@...mide.com>,
Orson Zhai <orsonzhai@...il.com>,
Baolin Wang <baolin.wang7@...il.com>,
Chunyan Zhang <zhang.lyra@...il.com>,
Pierre-Yves MORDRET <pierre-yves.mordret@...com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...com>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-i2c@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Qinglang Miao <miaoqinglang@...wei.com>
Subject: [PATCH 0/8] i2c: fix reference leak when pm_runtime_get_sync fails
pm_runtime_get_sync will increment the PM reference count
even failed. Forgetting to putting operation will result
in a reference leak here.
Replace it with pm_runtime_resume_and_get to keep usage
counter balanced.
BTW, pm_runtime_resume_and_get is introduced in v5.10-rc5 as
dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get
to dealwith usage counter")
Qinglang Miao (8):
i2c: cadence: fix reference leak when pm_runtime_get_sync fails
i2c: img-scb: fix reference leak when pm_runtime_get_sync fails
i2c: imx-lpi2c: fix reference leak when pm_runtime_get_sync fails
i2c: imx: fix reference leak when pm_runtime_get_sync fails
i2c: omap: fix reference leak when pm_runtime_get_sync fails
i2c: sprd: fix reference leak when pm_runtime_get_sync fails
i2c: stm32f7: fix reference leak when pm_runtime_get_sync fails
i2c: xiic: fix reference leak when pm_runtime_get_sync fails
drivers/i2c/busses/i2c-cadence.c | 4 ++--
drivers/i2c/busses/i2c-img-scb.c | 4 ++--
drivers/i2c/busses/i2c-imx-lpi2c.c | 2 +-
drivers/i2c/busses/i2c-imx.c | 4 ++--
drivers/i2c/busses/i2c-omap.c | 8 ++++----
drivers/i2c/busses/i2c-sprd.c | 4 ++--
drivers/i2c/busses/i2c-stm32f7.c | 12 ++++++------
drivers/i2c/busses/i2c-xiic.c | 4 ++--
8 files changed, 21 insertions(+), 21 deletions(-)
--
2.23.0
Powered by blists - more mailing lists