mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
If the total size of SGLs is lower than the size to copy, we will reach the end of the list so the sgl var will become NULL, and calling nvgpu_sgt_get_length will cause a null pointer dereference. This change will cause a BUG() which should be clearer than a NULL pointer dereference. There is no easy way to add more advanced error checking and handling, and an SGL bug would most likely be linked to another bug in the OS or OS layer. JIRA NVGPU-1279 Change-Id: Ide83f2b91ecae25f3a0f3202febfb115110315d7 Signed-off-by: Nicolas Benech <nbenech@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1923706 Reviewed-by: Automatic_Commit_Validation_User 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>
4.6 KiB
4.6 KiB