Re: [PATCH] drm/i915: Check DVO reads for errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 26, 2015 at 05:10:17PM +0000, Chris Wilson wrote:
> Not all of the DVO functions were checking the return value from their
> i2c routines when reading registers. This could lead to us feeding
> garbage values back into the hardware, possible causing further
> failures. In some cases the uninitialised stack values were being
> written into the kernel log.
> 
> Quentin Casasnovas suggested the simple solution of just initialising
> the output parameter to zero in all cases, but we may as well spend the
> extra few moments to fix it correctly.

I'm not sure your patch would be -stable material mainly because of the
diffstat.  Given the security implications, I would still rather have my
patch merged first so it can easily be back-ported to -stable and distro
kernels easily, and then have your patch on top when it gets properly
reviewed.  Especially since your patch looks like it's doing other
not strictly related stuffs like these:

> --- a/drivers/gpu/drm/i915/dvo_ivch.c
> +++ b/drivers/gpu/drm/i915/dvo_ivch.c
> @@ -151,8 +151,6 @@

>  struct ivch_priv {
>          bool quiet;
> 	 -
> 	 -       uint16_t width, height;
> 	  };
> 
> 
> @@ -263,9 +261,6 @@ static bool ivch_init(struct intel_dvo_device *dvo,
>                 goto out;
> 		        }
> 
> -       ivch_read(dvo, VR20, &priv->width);
> -       ivch_read(dvo, VR21, &priv->height);
> -
>         return true;
	

So again, I think my fix as a start would be preferable since it's quite
small and easily reviewable.

Quentin
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux