Files
linux-nvgpu/drivers/gpu/nvgpu/os/linux/sysfs.c
Prateek sethi 126187f232 gpu: nvgpu: Fix uninitialized memory access
gk20a_remove_gr_support() is freeing the local_golden_image and
local_golden_image->context. But there are instances where
local_golden_image is not allocated since freeing an
unallocated golden context image accesses the contents of
local_golden_image causes a fault.

Check golden_image_initialized flag before freeing
local_golden_image->context.

Jira NVGPU-1648
Bug 2461665

Change-Id: I19235d2ec9d77ba4ef00257f43436448f5f70b25
Signed-off-by: Prateek sethi <prsethi@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1997665
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-01-20 01:34:19 -08:00

34 KiB