security: tlk_driver: fix sys_munlock issue
authorScott Long <scottl@nvidia.com>
Wed, 7 Jan 2015 05:08:25 +0000 (21:08 -0800)
committerChris Johnson <cwj@nvidia.com>
Thu, 15 Jan 2015 18:44:33 +0000 (10:44 -0800)
commitddb690950d1402f995d0c73bb00bd5bf865cdda5
tree039521e8e19ae5010c766206ef617b03e403869c
parent17dddd86d07064c8ea00ed519b8749a7a0219f74
security: tlk_driver: fix sys_munlock issue

Only call sys_munlock if current->mm is non-null to avoid
race condition where mm cleanup happens before tlk_device_release
is invoked.

Bug 200069038

Change-Id: I0ec2f9ba5cdf4f380d79aea86bc11b67adbada51
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/670000
(cherry picked from commit 69a9d75b7ea4b49be78566a81b49bacbb34008e3)
Reviewed-on: http://git-master/r/672292
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Chris Johnson <cwj@nvidia.com>
Tested-by: Chris Johnson <cwj@nvidia.com>
security/tlk_driver/ote_comms.c