mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-07 18:05:21 +02:00
drm/tegra: Zero-initialize iosys_map
[ Upstream commit 3868ff006b
]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5ee7df8143
commit
abbba0768c
|
@ -177,7 +177,7 @@ static void tegra_bo_unpin(struct host1x_bo_mapping *map)
|
||||||
static void *tegra_bo_mmap(struct host1x_bo *bo)
|
static void *tegra_bo_mmap(struct host1x_bo *bo)
|
||||||
{
|
{
|
||||||
struct tegra_bo *obj = host1x_to_tegra_bo(bo);
|
struct tegra_bo *obj = host1x_to_tegra_bo(bo);
|
||||||
struct iosys_map map;
|
struct iosys_map map = { 0 };
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (obj->vaddr) {
|
if (obj->vaddr) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user