diff options
| author | Hamza Mahfooz <[email protected]> | 2023-06-21 19:19:05 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-06-30 17:11:35 +0000 |
| commit | af22d6a869cc26b519bfdcd54293c53f2e491870 (patch) | |
| tree | f1b7ac36222297ec615400eff292ff9057e06a2d /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | drm/amd/pm: Provide energy data in 15.625mJ units (diff) | |
| download | kernel-af22d6a869cc26b519bfdcd54293c53f2e491870.tar.gz kernel-af22d6a869cc26b519bfdcd54293c53f2e491870.zip | |
drm/amd/display: perform a bounds check before filling dirty rectangles
Currently, it is possible for us to access memory that we shouldn't.
Since, we acquire (possibly dangling) pointers to dirty rectangles
before doing a bounds check to make sure we can actually accommodate the
number of dirty rectangles userspace has requested to fill. This issue
is especially evident if a compositor requests both MPO and damage clips
at the same time, in which case I have observed a soft-hang. So, to
avoid this issue, perform the bounds check before filling a single dirty
rectangle and WARN() about it, if it is ever attempted in
fill_dc_dirty_rect().
Cc: [email protected] # 6.1+
Fixes: 30ebe41582d1 ("drm/amd/display: add FB_DAMAGE_CLIPS support")
Reviewed-by: Leo Li <[email protected]>
Signed-off-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions
