mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
video: tegra: nvmap: Fix INT30-C overflow defects
Add check for overflow in nvmap_handle.c when two unsigned integers are added and return error in case of overflow condition. JIRA: TMM-5724 Bug 4479044 Change-Id: I0f9075796d944cc0c28db15cc611df8a2da780d4 Signed-off-by: Surbhi Singh <surbhis@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3250694 Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Ketan Patil <ketanp@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
@@ -319,6 +319,7 @@ static void remove_handle_ref(struct nvmap_client *client,
|
||||
{
|
||||
nvmap_ref_lock(client);
|
||||
atomic_dec(&ref->handle->share_count);
|
||||
BUG_ON(client->handle_count == 0);
|
||||
client->handle_count--;
|
||||
rb_erase(&ref->node, &client->handle_refs);
|
||||
nvmap_ref_unlock(client);
|
||||
|
||||
Reference in New Issue
Block a user