Files
linux-nvgpu/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
Deepak Nibade 5b4451cad8 gpu: nvgpu: prevent extra user unmaps
It is possible that user space requests more unmaps on a buffer
than it requested maps
In this case, we end up dropping one extra refcount which could
lead to releasing buffer early

Fix this by checking and returning if buffer's user_mapped
refcount is already zero

Bug 200130521

Change-Id: Ic8ef2dbfe0476b16d852ad899b1ed0404b5bb7de
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/788904
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
2015-09-30 11:10:17 -07:00

88 KiB