mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
video: tegra: host: Fix bounds-checking
The length of the mod_locks array is NV_HOST1X_NB_MLOCKS, not NV_HOST1X_SYNCPT_NB_PTS. Change-Id: Ibce054bb8a168f2b83646745f2b62cd282b8ff9d Signed-off-by: Robert Morell <rmorell@nvidia.com> Acked-by: Erik Gilling <konkers@android.com>
This commit is contained in:
committed by
Erik Gilling
parent
d340f9224d
commit
d6f7633ef2
@@ -452,7 +452,7 @@ static int nvhost_ioctl_ctrl_module_mutex(
|
||||
struct nvhost_ctrl_module_mutex_args *args)
|
||||
{
|
||||
int err = 0;
|
||||
if (args->id >= NV_HOST1X_SYNCPT_NB_PTS ||
|
||||
if (args->id >= NV_HOST1X_NB_MLOCKS ||
|
||||
args->lock > 1)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user