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>
Sat, 11 Aug 2012 06:15:03 +0000 (23:15 -0700)
commit70d4ced2d12a1251202d67ffae7f5c0b3013cc94
tree34a76e46b9be21b6f785073600d9a5df0d427e2e
parent642d37a0eee196d0ce811dd11bb7af5ba281ee3a
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>
drivers/video/tegra/nvmap/nvmap.c