Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D drm-hwcomposer
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 13
    • Issues 13
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and 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
  • drm-hwcomposer
  • drm-hwcomposer
  • Merge requests
  • !45

drm_hwcomposer: Initialize buffer_ pointer to NULL

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged John Stultz requested to merge john.stultz/drm-hwcomposer:import-crash into master Feb 28, 2019
  • Overview 3
  • Commits 2
  • Pipelines 3
  • Changes 2

In some cases, we've seen drm_hwcomposer start to try to compose frames before anything has called SetClientTarget().

This seems to be some sort of a race, which for some reason we only see with certain dummy HDMI dongles (which provide fake EDID data) which allow our lab machines to run headless. I'm still trying to understand more about why this happens only in this case.

The net of the issue is we see CreateComposition() being called, which adds the client_layer_ to the zmap. Then it creates the DrmHwcLayers copying the non-initialized buffer_ value as the sf_handle.

This then later causes a crash in ImportBuffer() when we traverse the non-null (but invalid) hnd value.

Thus, this patch simply initilizes the buffer_ pointer to NULL so that we error out properly in the case of the race.

Reported-by: YongQin Liu yongqin.liu@linaro.org Signed-off-by: John Stultz john.stultz@linaro.org Change-Id: I5fde3fccde86519edb04e61cbc2842eda395ade4

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: import-crash