ion: replace userspace handle cookies with idr
authorColin Cross <ccross@android.com>
Wed, 21 Aug 2013 05:59:41 +0000 (22:59 -0700)
committerColin Cross <ccross@android.com>
Fri, 20 Sep 2013 04:03:32 +0000 (23:03 -0500)
commit1126d98d8e34d771afcc72ce5d1c37ad4d474402
tree21100c65bdc75fc3636e3af1d852b3d258873a5e
parent846b79b79391558e07b088193e14affe89d3be1b
ion: replace userspace handle cookies with idr

Userspace handles should not leak kernel virtual addresses to
userspace.  They have to be validated by looking them up in an
rbtree anyways, so replace them with an idr and validate them
by using idr_find to convert the id number to the struct
ion_handle pointer.

Change-Id: Iab5667ba6f3a73256fec3949b23a9a6f8e14a283
Signed-off-by: Colin Cross <ccross@android.com>
drivers/gpu/ion/ion.c