From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>
Cc: "Christian König" <christian.koenig@amd.com>,
"Chunming Zhou" <david1.zhou@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Jammy Zhou" <Jammy.Zhou@amd.com>, "monk.liu" <monk.liu@amd.com>,
"Marek Olšák" <marek.olsak@amd.com>,
dri-devel@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
security@kernel.org,
"Ilja Van Sprundel" <ivansprundel@ioactive.com>
Subject: [patch] drm/amdgpu: signedness bug in amdgpu_cs_parser_init()
Date: Fri, 25 Sep 2015 11:36:55 +0000 [thread overview]
Message-ID: <20150925113655.GA12962@mwanda> (raw)
In-Reply-To: <A3397C8B8B789E45844E7EC5DEAD89D06E91395A@satlexdag05.amd.com>
The "i" variable should be signed or it leads to a crash in the error
handling code.
Fixes: 1d263474c441 ('drm/amdgpu: unwind properly in amdgpu_cs_parser_init()')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 749420f..cb3c274 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -156,7 +156,8 @@ int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, void *data)
uint64_t *chunk_array_user;
uint64_t *chunk_array;
struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
- unsigned size, i;
+ unsigned size;
+ int i;
int ret;
if (cs->in.num_chunks = 0)
next parent reply other threads:[~2015-09-25 11:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <A3397C8B8B789E45844E7EC5DEAD89D06E91395A@satlexdag05.amd.com>
2015-09-25 11:36 ` Dan Carpenter [this message]
2015-09-29 17:44 ` [patch] drm/amdgpu: signedness bug in amdgpu_cs_parser_init() 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=20150925113655.GA12962@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Jammy.Zhou@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=david1.zhou@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ivansprundel@ioactive.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=marek.olsak@amd.com \
--cc=monk.liu@amd.com \
--cc=security@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox