From: Inki Dae <inki.dae@samsung.com>
To: Navid Emamdoost <navid.emamdoost@gmail.com>,
Joonyoung Shim <jy0922.shim@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Kukjin Kim <kgene@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: emamd001@umn.edu, wu000273@umn.edu, kjlu@umn.edu, mccamant@cs.umn.edu
Subject: Re: [PATCH v2] drm/exynos: fix ref count leak in mic_pre_enable
Date: Tue, 16 Jun 2020 10:13:23 +0900 [thread overview]
Message-ID: <ece0b0bb-43d6-0e8e-3fcd-280dac6cd07f@samsung.com> (raw)
In-Reply-To: <20200615054928.55188-1-navid.emamdoost@gmail.com>
20. 6. 15. 오후 2:49에 Navid Emamdoost 이(가) 쓴 글:
> in mic_pre_enable, 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>
> ---
> Changes in v2:
> - reuse the unlock label and call pm_runtime_put_noidle
Picked it up.
Thanks,
Inki Dae
> ---
> ---
> drivers/gpu/drm/exynos/exynos_drm_mic.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> index a86abc173605..3821ea76a703 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c
> @@ -269,8 +269,10 @@ static void mic_pre_enable(struct drm_bridge *bridge)
> goto unlock;
>
> ret = pm_runtime_get_sync(mic->dev);
> - if (ret < 0)
> + if (ret < 0) {
> + pm_runtime_put_noidle(mic->dev);
> goto unlock;
> + }
>
> mic_set_path(mic, 1);
>
>
next prev parent reply other threads:[~2020-06-16 1:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200614062349epcas1p1e285479c1e6483708b62f93e70a453a4@epcas1p1.samsung.com>
2020-06-14 6:23 ` [PATCH] drm/exynos: fix ref count leak in mic_pre_enable Navid Emamdoost
2020-06-15 0:52 ` Inki Dae
2020-06-15 5:49 ` [PATCH v2] " Navid Emamdoost
2020-06-16 1:13 ` Inki Dae [this message]
2020-06-15 5:50 ` [PATCH] " Navid Emamdoost
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=ece0b0bb-43d6-0e8e-3fcd-280dac6cd07f@samsung.com \
--to=inki.dae@samsung.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emamd001@umn.edu \
--cc=jy0922.shim@samsung.com \
--cc=kgene@kernel.org \
--cc=kjlu@umn.edu \
--cc=krzk@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mccamant@cs.umn.edu \
--cc=navid.emamdoost@gmail.com \
--cc=sw0312.kim@samsung.com \
--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).