ANDROID: ion: check for kref overflow

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

Signed-off-by: Daniel Rosenberg <drosen@google.com>

Bug: 31992382
Test: See bug for poc
AOSP-Change-Id: I6bff1df385742b1d836d43180dc87fadcea80782
CVE-2017-0507
[haggertk]: Backport to 3.4/msm8974

Change-Id: I02347c215d567c611fc9a3689c009506988d189a
Original-Change-Id: Iac5c5163dce4fa7facd0e690d07dd9e48558c50f
1 file changed