Skip to content

Commit 3868ff0

Browse files
cyndisthierryreding
authored andcommitted
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
1 parent e889a31 commit 3868ff0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/gpu/drm/tegra

drivers/gpu/drm/tegra/gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ static void tegra_bo_unpin(struct host1x_bo_mapping *map)
177177
static void *tegra_bo_mmap(struct host1x_bo *bo)
178178
{
179179
struct tegra_bo *obj = host1x_to_tegra_bo(bo);
180-
struct iosys_map map;
180+
struct iosys_map map = { 0 };
181181
int ret;
182182

183183
if (obj->vaddr)

0 commit comments

Comments
 (0)