Re: [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture()

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

 



On Fri, Jul 3, 2015 at 5:38 AM, Christian König
<christian.koenig@xxxxxxx> wrote:
> On 03.07.2015 10:54, Dan Carpenter wrote:
>>
>> The "if (pass_size > buf->total)" can underflow so I have changed the
>> type of size and pass_size to unsigned to avoid this problem.
>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
>
> Reviewed-by: Christian König <christian.koenig@xxxxxxx>

Applied.  thanks.

>
>> ---
>> This code is on the way out, but whatever.  I may as well send this
>> patch since I already wrote the patch.
>
>
> Yeah, indeed but it will still take a while until we can really remove it.
>
> Well, maybe it's time to give it a try.

I think it's probably about time.  IIRC, intel already dropped UMS support.

Alex

>
> Regards,
> Christian.
>
>
>>
>> diff --git a/drivers/gpu/drm/radeon/r600_cp.c
>> b/drivers/gpu/drm/radeon/r600_cp.c
>> index 09e3f39..98f9ada 100644
>> --- a/drivers/gpu/drm/radeon/r600_cp.c
>> +++ b/drivers/gpu/drm/radeon/r600_cp.c
>> @@ -2483,7 +2483,7 @@ int r600_cp_dispatch_texture(struct drm_device *dev,
>>         struct drm_buf *buf;
>>         u32 *buffer;
>>         const u8 __user *data;
>> -       int size, pass_size;
>> +       unsigned int size, pass_size;
>>         u64 src_offset, dst_offset;
>>         if (!radeon_check_offset(dev_priv, tex->offset)) {
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux