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 <[email protected]> Signed-off-by: Mikko Perttunen <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e889a31 commit 3868ff0

File tree

1 file changed

+1
-1
lines changed
  • drivers/gpu/drm/tegra

1 file changed

+1
-1
lines changed

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)