mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
msm: kgsl: Limit the syncpoint count for AUX commands
KGSL internally has a limit on the length of the list of syncpoints
submitted in a single AUX command. Enforce this limit so we don't
overwrite memory beyond the structures that track these syncpoints.
Change-Id: I261bfd4f786ff7e4fbe07e8bca9e9b8d8b87c950
Signed-off-by: Lynus Vaz <quic_lvaz@quicinc.com>
Signed-off-by: Kaushal Sanadhya <quic_ksanadhy@quicinc.com>
(cherry picked from commit 7779997686)
This commit is contained in:
parent
a6df3cb63e
commit
d213829600
1 changed files with 4 additions and 0 deletions
|
|
@ -2038,6 +2038,10 @@ long kgsl_ioctl_gpu_aux_command(struct kgsl_device_private *dev_priv,
|
|||
(KGSL_GPU_AUX_COMMAND_TIMELINE)))
|
||||
return -EINVAL;
|
||||
|
||||
if ((param->flags & KGSL_GPU_AUX_COMMAND_SYNC) &&
|
||||
(param->numsyncs > KGSL_MAX_SYNCPOINTS))
|
||||
return -EINVAL;
|
||||
|
||||
context = kgsl_context_get_owner(dev_priv, param->context_id);
|
||||
if (!context)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue