video: tegra: nvmap: fix read failures, super user and noref pinning
authorGary King <gking@nvidia.com>
Mon, 11 Oct 2010 21:22:35 +0000 (14:22 -0700)
committerDan Willemsen <dwillemsen@nvidia.com>
Thu, 1 Dec 2011 05:36:06 +0000 (21:36 -0800)
commitce4d7af217206130890970dfa4e1051a48fb9d13
tree9deaa657b83ac082fb252264bcfbc30c599b26b9
parenta15f96ec6de6c511fc2183a81a6fba67fc034ddc
video: tegra: nvmap: fix read failures, super user and noref pinning

a >= vs > error when checking the operating region of the read and
write ioctls was causing failures when reading the last byte of a handle.

the super-user node (knvmap) wasn't registered correctly due to a cut-
and-paste error, and the regular user node was assigned super-user
priveleges.

noref pinning wasn't correctly validating that the specified handle
existed before pinning it, which caused the reference count for the
handle to become imbalanced on a subsequent unpin

Change-Id: I9985b85023705b00389a53fb962c3b60d62da6b8
Signed-off-by: Gary King <gking@nvidia.com>
drivers/video/tegra/nvmap/nvmap.c
drivers/video/tegra/nvmap/nvmap_dev.c
drivers/video/tegra/nvmap/nvmap_ioctl.c