mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
Previously initializing buddy_allocator with size=0 initialized large memory block. With fixes in buddy_allocator_init() function, size = 0 triggered segmentation fault and so size was temporarily updated to fixed value. This patch updates buddy_allocator_init() function to return error if requested size of buddy_allocator is zero. As kernel VMA is absent for VGPU, this patch also updates nvgpu_vm_do_init() function to not allocate kernel VMA with size = 0. Jira NVGPU-3005 Change-Id: I568fbbff6ac2c66395d1dc5a4b35304c7f4002fb Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2113190 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>