mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
drm/amdgpu: Free CPER entry after committing to ring
Free CPER entry when it's committed to CPER ring to avoid memory leak. Signed-off-by: Xiang Liu <xiang.liu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
899634a57a
commit
677ae51f49
|
|
@ -301,6 +301,7 @@ int amdgpu_cper_generate_ue_record(struct amdgpu_device *adev,
|
|||
return ret;
|
||||
|
||||
amdgpu_cper_ring_write(ring, fatal, fatal->record_length);
|
||||
kfree(fatal);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -323,6 +324,7 @@ int amdgpu_cper_generate_bp_threshold_record(struct amdgpu_device *adev)
|
|||
return ret;
|
||||
|
||||
amdgpu_cper_ring_write(ring, bp_threshold, bp_threshold->record_length);
|
||||
kfree(bp_threshold);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -399,6 +401,7 @@ int amdgpu_cper_generate_ce_records(struct amdgpu_device *adev,
|
|||
}
|
||||
|
||||
amdgpu_cper_ring_write(ring, corrected, corrected->record_length);
|
||||
kfree(corrected);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user