Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
xserver
xserver
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 892
    • Issues 892
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 86
    • Merge Requests 86
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • xorg
  • xserverxserver
  • Merge Requests
  • !444

Merged
Opened May 15, 2020 by José Casanova Crespo@chemaContributor

modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation

  • Overview 7
  • Commits 1
  • Pipelines 4
  • Changes 1

Since the introduction of "modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize" the fb_id isn't initialited at drmmode_xf86crtc_resize.

Rotate operation of XRandR uses rotate_bo. So in this case the fb_id associated to the front_bo is not initialized at drmmode_set_mode_major. So fd_id remains 0.

As every call to drmmode_xf86crtc_resize allocates a new front_bo we should destroy unconditionally the old_front_bo if operation success. So we free the allocated GBM handles.

This avoids crashing xserver with a OOM in the RPI4 1Gb at 4k resolution after 3 series xrandr rotations from normal to left and vice versa reported at https://github.com/raspberrypi/firmware/issues/1345

Signed-off-by: Jose Maria Casanova Crespo jmcasanova@igalia.com Closes: #1024 (closed) Fixes: 87745321 "modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize"

I would like this fix to be nominated to the stable server-1.20-branch

Edited May 15, 2020 by José Casanova Crespo
Assignee
Assign to
Reviewer
Request review from
xserver-1.20.9
Milestone
xserver-1.20.9
Assign milestone
Time tracking
Reference: xorg/xserver!444
Source branch: fix-front_bo-leak