Skip to content

Commit

Permalink
drm/tegra: Zero-initialize iosys_map
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
cyndis authored and thierryreding committed Oct 11, 2023
1 parent e889a31 commit 3868ff0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/tegra/gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static void tegra_bo_unpin(struct host1x_bo_mapping *map)
static void *tegra_bo_mmap(struct host1x_bo *bo)
{
struct tegra_bo *obj = host1x_to_tegra_bo(bo);
struct iosys_map map;
struct iosys_map map = { 0 };
int ret;

if (obj->vaddr)
Expand Down

0 comments on commit 3868ff0

Please sign in to comment.