gpu: nvgpu: Validate buffer_offset argument
authorskadamati <skadamati@nvidia.com>
Thu, 28 Sep 2017 06:51:28 +0000 (11:51 +0530)
committerMatthew Pedro <mapedro@nvidia.com>
Wed, 11 Apr 2018 05:32:18 +0000 (22:32 -0700)
commit86d51cfe09ee9f123aa5ec3c9b7ff1d94d5de39b
tree1979db0281c1517c1134fec78293e86e0bf26c2f
parent5330e599eb32ed6ee05c45d51d1229d12048842d
gpu: nvgpu: Validate buffer_offset argument

Validate the mapping_size argument in the VM mapping IOCTL before
attempting to use the argument for anything.

Manual Cherry pick - https://git-master.nvidia.com/r/1547046

Bug 1954931
Bug 1993254
Bug 200288656

Change-Id: I81b22dc566c6c6f89e5e62604ce996376b33a343
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1547046
Signed-off-by: skadamati <skadamati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1569976
(cherry picked from commit 84c14d463b613b6f29455295f27683821a78dce9)
Reviewed-on: https://git-master.nvidia.com/r/1584264
(cherry picked from commit 25e2877d988453dc29bd1573e6d8f8b566bce170)
Signed-off-by: Gagan Grover <ggrover@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1606956
Reviewed-on: https://git-master.nvidia.com/r/1632961
(cherry picked from commit aa3a7d24153973653f9a278baa67fea3475fa9c3)
Reviewed-on: https://git-master.nvidia.com/r/1606103
GVS: Gerrit_Virtual_Submit
Tested-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
drivers/gpu/nvgpu/gk20a/mm_gk20a.c