From: "Christian König" <christian.koenig@amd.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Alex Deucher <alexander.deucher@amd.com>
Cc: kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture()
Date: Fri, 03 Jul 2015 09:38:10 +0000 [thread overview]
Message-ID: <55965802.3080705@amd.com> (raw)
In-Reply-To: <20150703085428.GB11901@mwanda>
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
WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <christian.koenig@amd.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Alex Deucher <alexander.deucher@amd.com>
Cc: kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture()
Date: Fri, 3 Jul 2015 11:38:10 +0200 [thread overview]
Message-ID: <55965802.3080705@amd.com> (raw)
In-Reply-To: <20150703085428.GB11901@mwanda>
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)) {
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-07-03 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 8:54 [patch] drm/radeon: fix underflow in r600_cp_dispatch_texture() Dan Carpenter
2015-07-03 8:54 ` Dan Carpenter
2015-07-03 9:38 ` Christian König [this message]
2015-07-03 9:38 ` Christian König
2015-07-06 21:16 ` Alex Deucher
2015-07-06 21:16 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55965802.3080705@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.