Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 887
    • Issues 887
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 113
    • Merge requests 113
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • xserverxserver
  • Merge requests
  • !242

xwayland: Do not free a NULL GBM bo

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Olivier Fourdan requested to merge ofourdan/xserver:null-gbm-bo into master Jul 23, 2019
  • Overview 1
  • Commits 1
  • Pipelines 2
  • Changes 1

Both gbm_bo_create() and gbm_bo_create_with_modifiers() can fail and return NULL.

If that occurs, xwl_glamor_gbm_create_pixmap() will not create a pixmap for the (NULL) GBM bo, but would still try to free the bo which leads to a crash in mesa:

  [...]
  #7  <signal handler called>
  #8  in gbm_bo_destroy (bo=0x0) at ../src/gbm/main/gbm.c:439
  #9  in xwl_glamor_gbm_create_pixmap () at xwayland-glamor-gbm.c:245
        format = <optimized out>
        xwl_screen = <optimized out>
        xwl_gbm = <optimized out>
        bo = 0x0
        pixmap = <optimized out>
  #10 in ProcCreatePixmap () at dispatch.c:1440
  #11 in Dispatch () at dispatch.c:478
  #12 in dix_main () at main.c:276

To avoid the crash, only free the GBM bo if not NULL.

Signed-off-by: Olivier Fourdan ofourdan@redhat.com Bugzilla: https://bugzilla.redhat.com/1729925

Edited Jul 23, 2019 by Adam Jackson
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: null-gbm-bo