From: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
To: David Binderman <dcb314@hotmail.com>,
"alexander.deucher@amd.com" <alexander.deucher@amd.com>,
"christian.koenig@amd.com" <christian.koenig@amd.com>,
"David1.Zhou@amd.com" <David1.Zhou@amd.com>,
"airlied@linux.ie" <airlied@linux.ie>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Harry Wentland <harry.wentland@amd.com>,
"Li, Roman" <Roman.Li@amd.com>
Subject: Re: linux-4.16-rc5/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:1723]: (warning) Possible null pointer dereference: pipe_ctx
Date: Mon, 12 Mar 2018 18:23:22 -0400 [thread overview]
Message-ID: <8b55ac58-ae20-7662-10bb-c446701cd67e@amd.com> (raw)
In-Reply-To: <HE1PR0802MB2331D43DAFA4EDDE964F0CC69CD30@HE1PR0802MB2331.eurprd08.prod.outlook.com>
On 03/12/2018 06:22 AM, David Binderman wrote:
> hello there,
>
> Source code is
>
>
> for (i = 0; i < dc->res_pool->pipe_count; i++) {
> if (res_ctx->pipe_ctx[i].stream) {
> pipe_ctx = &res_ctx->pipe_ctx[i];
> *pipe_idx = i;
> break;
> }
> }
Indeed something like
if (!pipe_ctx)
return false;
seems the right thing here.
Harry, Roman , your opinion ?
Andrey
>
> /* Only supports eDP */
> if (pipe_ctx->stream->sink->link->connector_signal != SIGNAL_TYPE_EDP)
> return false;
>
> Suggest add some code to deal with the case that the for loop doesn't find
> what it is looking for and so pipe_ctx is NULL.
>
> Regards
>
> David Binderman
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next parent reply other threads:[~2018-03-12 22:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <HE1PR0802MB2331D43DAFA4EDDE964F0CC69CD30@HE1PR0802MB2331.eurprd08.prod.outlook.com>
2018-03-12 22:23 ` Andrey Grodzovsky [this message]
2018-03-12 23:06 ` Li, Roman
2018-03-12 23:10 ` Andrey Grodzovsky
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=8b55ac58-ae20-7662-10bb-c446701cd67e@amd.com \
--to=andrey.grodzovsky@amd.com \
--cc=David1.Zhou@amd.com \
--cc=Roman.Li@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dcb314@hotmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®