lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 12 Mar 2018 18:23:22 -0400
From:   Andrey Grodzovsky <Andrey.Grodzovsky@....com>
To:     David Binderman <dcb314@...mail.com>,
        "alexander.deucher@....com" <alexander.deucher@....com>,
        "christian.koenig@....com" <christian.koenig@....com>,
        "David1.Zhou@....com" <David1.Zhou@....com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Harry Wentland <harry.wentland@....com>,
        "Li, Roman" <Roman.Li@....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



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@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ