From: Dan Carpenter <dan.carpenter@oracle.com>
To: Walter Harms <wharms@bfs.de>
Cc: "David1.Zhou@amd.com" <David1.Zhou@amd.com>,
"mario.kleiner.de@gmail.com" <mario.kleiner.de@gmail.com>,
"sunpeng.li@amd.com" <sunpeng.li@amd.com>,
"Bhawanpreet.Lakha@amd.com" <Bhawanpreet.Lakha@amd.com>,
"David.Francis@amd.com" <David.Francis@amd.com>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"nicholas.kazlauskas@amd.com" <nicholas.kazlauskas@amd.com>,
"airlied@linux.ie" <airlied@linux.ie>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"alexander.deucher@amd.com" <alexander.deucher@amd.com>,
"harry.wentland@amd.com" <harry.wentland@amd.com>,
"christian.koenig@amd.com" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/amdgpu/display: Fix an error handling path in 'dm_update_crtc_state()'
Date: Thu, 12 Mar 2020 13:38:42 +0000 [thread overview]
Message-ID: <20200312133842.GI11561@kadam> (raw)
In-Reply-To: <97d88948e2ab4ec19c5a0c6d064df08b@bfs.de>
On Mon, Mar 09, 2020 at 08:24:04AM +0000, Walter Harms wrote:
>
> ________________________________________
> Von: kernel-janitors-owner@vger.kernel.org <kernel-janitors-owner@vger.kernel.org> im Auftrag von Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Gesendet: Sonntag, 8. März 2020 10:26
> An: harry.wentland@amd.com; sunpeng.li@amd.com; alexander.deucher@amd.com; christian.koenig@amd.com; David1.Zhou@amd.com; airlied@linux.ie; daniel@ffwll.ch; nicholas.kazlauskas@amd.com; Bhawanpreet.Lakha@amd.com; mario.kleiner.de@gmail.com; David.Francis@amd.com
> Cc: amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org; Christophe JAILLET
> Betreff: [PATCH] drm/amdgpu/display: Fix an error handling path in 'dm_update_crtc_state()'
>
> 'dc_stream_release()' may be called twice. Once here, and once below in the
> error handling path if we branch to the 'fail' label.
>
> Set 'new_stream' to NULL, once released to avoid the duplicated release
> function call.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Maybe the 'goto fail' at line 7745 should be turned into a 'return ret'
> instead. Could be clearer.
>
> No Fixes tag provided because I've not been able to dig deep enough in the
> git history.
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 97c1b01c0fc1..9d7773a77c4f 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -7704,8 +7704,10 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
>
> skip_modeset:
> /* Release extra reference */
> - if (new_stream)
> - dc_stream_release(new_stream);
> + if (new_stream) {
> + dc_stream_release(new_stream);
> + new_stream = NULL;
> + }
>
>
> dc_stream_release() is NULL-checked, so the if can be dropped.
>
> re,
> wh
Walter, it's really hard to separate your reply from the quoted email.
What's going on with that? Could you configure your email client to
use "> " for the quoted bit?
regards,
dan carpenter
prev parent reply other threads:[~2020-03-12 13:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-08 9:26 [PATCH] drm/amdgpu/display: Fix an error handling path in 'dm_update_crtc_state()' Christophe JAILLET
2020-03-09 8:24 ` AW: " Walter Harms
2020-03-12 13:38 ` Dan Carpenter [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=20200312133842.GI11561@kadam \
--to=dan.carpenter@oracle.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=David.Francis@amd.com \
--cc=David1.Zhou@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.kleiner.de@gmail.com \
--cc=nicholas.kazlauskas@amd.com \
--cc=sunpeng.li@amd.com \
--cc=wharms@bfs.de \
/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).