mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 07:31:29 +00:00
drm/radeon: fix underflow in r600_cp_dispatch_texture()
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. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
5e3c4f9070
commit
866a920403
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user