mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
drm/msm: fix potential submit error path issue
Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
ba344afd66
commit
a9e26cab40
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue