* [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture()
@ 2015-07-03 8:54 Dan Carpenter
2015-07-03 9:38 ` Christian König
0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2015-07-03 8:54 UTC (permalink / raw)
To: Alex Deucher; +Cc: kernel-janitors, Christian König, dri-devel
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@oracle.com>
---
This code is on the way out, but whatever. I may as well send this
patch since I already wrote the patch.
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)) {
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture()
2015-07-03 8:54 [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture() Dan Carpenter
@ 2015-07-03 9:38 ` Christian König
2015-07-06 21:16 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2015-07-03 9:38 UTC (permalink / raw)
To: Dan Carpenter, Alex Deucher; +Cc: kernel-janitors, dri-devel
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@oracle.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> 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.
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)) {
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture()
2015-07-03 9:38 ` Christian König
@ 2015-07-06 21:16 ` Alex Deucher
0 siblings, 0 replies; 3+ messages in thread
From: Alex Deucher @ 2015-07-06 21:16 UTC (permalink / raw)
To: Christian König
Cc: Alex Deucher, kernel-janitors, Maling list - DRI developers,
Dan Carpenter
On Fri, Jul 3, 2015 at 5:38 AM, Christian König
<christian.koenig@amd.com> 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@oracle.com>
>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-06 21:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-03 8:54 [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture() Dan Carpenter
2015-07-03 9:38 ` Christian König
2015-07-06 21:16 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox