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)
committerGary King <gking@nvidia.com>
Tue, 12 Oct 2010 01:01:55 +0000 (18:01 -0700)
commit9f2af3bee9b5bddb6b54040f28c09350c8dd9e38
tree142f36e49efe02ce66341b8a23f7451755f8f82a
parent9cd8acf1b9971bf049abab2fb8513fb6a2cd1a3b
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