projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba344af
)
drm/msm: fix potential submit error path issue
author
Rob Clark
<robdclark@gmail.com>
Wed, 1 Jun 2016 18:02:51 +0000
(14:02 -0400)
committer
Rob Clark
<robdclark@gmail.com>
Sat, 4 Jun 2016 18:45:50 +0000
(14:45 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/msm_gem_submit.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/msm/msm_gem_submit.c
b/drivers/gpu/drm/msm/msm_gem_submit.c
index 635eff17c3d116545c75d3e1a4d5cd9d652a0fca..eb4bb8b2f3a5cae6799e1ef142af1be3da568e5d 100644
(file)
--- a/
drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/
drivers/gpu/drm/msm/msm_gem_submit.c
@@
-77,6
+77,11
@@
static int submit_lookup_objects(struct msm_gem_submit *submit,
void __user *userptr =
u64_to_user_ptr(args->bos + (i * sizeof(submit_bo)));
+ /* make sure we don't have garbage flags, in case we hit
+ * error path before flags is initialized:
+ */
+ submit->bos[i].flags = 0;
+
ret = copy_from_user(&submit_bo, userptr, sizeof(submit_bo));
if (ret) {
ret = -EFAULT;