staging: android: ion: check for kref overflow
authorDaniel Rosenberg <drosen@google.com>
Tue, 21 Aug 2018 20:31:50 +0000 (13:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Aug 2018 05:21:37 +0000 (07:21 +0200)
commit5554e8fc645c4e20d9356135d35b185a62a99eb2
tree9eeea5043038f343fb4b3ab8f146f77a22822623
parentdfd3805948b6e0165ad2c836ba5ecab2328ea620
staging: android: ion: check for kref overflow

This patch is against 4.4. It does not apply to master due to a large
rework of ion in 4.12 which removed the affected functions altogther.
4c23cbff073f3b9b ("staging: android: ion: Remove import interface")

Userspace can cause the kref to handles to increment
arbitrarily high. Ensure it does not overflow.

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion.c