Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/tegra: Zero-initialize iosys_map

UBSAN reports an invalid load for bool, as the iosys_map is read
later without being initialized. Zero-initialize it to avoid this.

Reported-by: Ashish Mhetre <amhetre@nvidia.com>
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901115910.701518-2-cyndis@kapsi.fi

authored by

Mikko Perttunen and committed by
Thierry Reding
3868ff00 e889a311

+1 -1
+1 -1
drivers/gpu/drm/tegra/gem.c
··· 177 177 static void *tegra_bo_mmap(struct host1x_bo *bo) 178 178 { 179 179 struct tegra_bo *obj = host1x_to_tegra_bo(bo); 180 - struct iosys_map map; 180 + struct iosys_map map = { 0 }; 181 181 int ret; 182 182 183 183 if (obj->vaddr)