mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/amdgpu/vcn: Fix double-free of vcn dump buffer
The buffer is already freed as part of amdgpu_vcn_reg_dump_fini(). The
issue is introduced by below patch series.
Fixes: de55cbff5c ("drm/amdgpu/vcn: Add regdump helper functions")
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1549,6 +1549,7 @@ int amdgpu_vcn_reg_dump_init(struct amdgpu_device *adev,
|
||||
static void amdgpu_vcn_reg_dump_fini(struct amdgpu_device *adev)
|
||||
{
|
||||
kfree(adev->vcn.ip_dump);
|
||||
adev->vcn.ip_dump = NULL;
|
||||
adev->vcn.reg_list = NULL;
|
||||
adev->vcn.reg_count = 0;
|
||||
}
|
||||
|
||||
@@ -354,7 +354,6 @@ static int vcn_v3_0_sw_fini(struct amdgpu_ip_block *ip_block)
|
||||
return r;
|
||||
}
|
||||
|
||||
kfree(adev->vcn.ip_dump);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -280,8 +280,6 @@ static int vcn_v4_0_3_sw_fini(struct amdgpu_ip_block *ip_block)
|
||||
return r;
|
||||
}
|
||||
|
||||
kfree(adev->vcn.ip_dump);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -275,8 +275,6 @@ static int vcn_v4_0_5_sw_fini(struct amdgpu_ip_block *ip_block)
|
||||
return r;
|
||||
}
|
||||
|
||||
kfree(adev->vcn.ip_dump);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user