From d6f7633ef29cce12e4b7526f78286f2c8c818219 Mon Sep 17 00:00:00 2001 From: Robert Morell Date: Fri, 19 Nov 2010 19:17:36 -0800 Subject: [PATCH] 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 Acked-by: Erik Gilling --- drivers/video/tegra/host/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c index daed882be5a2..42d268e7da59 100644 --- a/drivers/video/tegra/host/dev.c +++ b/drivers/video/tegra/host/dev.c @@ -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; -- 2.34.1