gpu: nvgpu: Validate buffer_offset argument
authorDebarshi Dutta <ddutta@nvidia.com>
Fri, 9 Mar 2018 07:11:55 +0000 (12:11 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Fri, 9 Mar 2018 18:19:13 +0000 (10:19 -0800)
commit9d09b31470a2714817375f86d9e56ffb1b617739
treee108891e100d554333299acf52432ea28de66c28
parent370b9f7a1dad9ccb7198bb0ffd30a8e7df112ab2
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 1965443

Change-Id: I81b22dc566c6c6f89e5e62604ce996376b33a343
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1547046
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
(cherry picked from commit e68391690cfcc23b77c68aec3f9605badea226ed in
dev-kernel)
Reviewed-on: https://git-master.nvidia.com/r/1671883
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
drivers/gpu/nvgpu/gk20a/mm_gk20a.c