[PATCH] modesetting: NULL assignment for drmmode_set_target_scanout_target_cpu

Dave Airlie airlied at gmail.com
Fri Jul 8 04:38:15 UTC 2016


On 8 July 2016 at 07:50, Alex Goins <agoins at nvidia.com> wrote:
> Commit 80e64dae: "modesetting: Implement PRIME syncing as a sink" originally was
> supposed to have this line, but it was dropped as part of the merge process.
>
> Foregoing the NULL assignment causes a ton of problems with dereferencing
> uninitialized memory.
>
> Signed-off-by: Alex Goins <agoins at nvidia.com>

Reviewed-by: Dave Airlie <airlied at redhat.com>
> ---
>  hw/xfree86/drivers/modesetting/drmmode_display.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
> index 4a3fdc5..2cdcad1 100644
> --- a/hw/xfree86/drivers/modesetting/drmmode_display.c
> +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
> @@ -956,6 +956,7 @@ drmmode_set_target_scanout_pixmap_cpu(xf86CrtcPtr crtc, PixmapPtr ppix,
>              DamageUnregister(ppriv->slave_damage);
>              ppriv->slave_damage = NULL;
>          }
> +        *target = NULL;
>      }
>
>      if (!ppix)
> --
> 1.9.1
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list