video: tegra: nvmap: fix usermode input validation
authorTuomas Tynkkynen <ttynkkynen@nvidia.com>
Tue, 31 Jul 2012 12:01:04 +0000 (15:01 +0300)
committerSimone Willett <swillett@nvidia.com>
Wed, 15 Aug 2012 01:21:18 +0000 (18:21 -0700)
commit88977030123b53447a7cc7a286e2e944489270c1
tree88faa5f9fbcb20db252234f79d96db7bc4bfea3c
parentc3f2e8c77c8e9a2a04c243fc2e639c90024e6162
video: tegra: nvmap: fix usermode input validation

nvmap_pin_ids accepts a list of handles to pin, which are passed
directly from usermode when called from nvmap_ioctl_pinop.

However, if invalid handles are passed in, the function might
still access them as valid handles, and cause a crash.

Bug 1023954

Change-Id: I6b98a2ef448bb496be7d569ddd4fb516fc399cba
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/119667
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
(cherry picked from commit 70d4ced2d12a1251202d67ffae7f5c0b3013cc94)
Reviewed-on: http://git-master/r/123478
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
drivers/video/tegra/nvmap/nvmap.c