Skip to content
GitLab
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 924
    • Issues 924
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 131
    • Merge requests 131
  • 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
  • xorgxorg
  • xserverxserver
  • Merge requests
  • !937

[Regression] dix: Fix overzealous caching of ResourceClientBits()

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Olivier Fourdan requested to merge ofourdan/xserver:revert-commit-c7311654 into master Jul 12, 2022
  • Overview 9
  • Commits 1
  • Pipelines 5
  • Changes 1

Commit c7311654 cached the value of ResourceClientBits(), but that value depends on the MaxClients value set either from the command line or from the configuration file.

For the latter, a call to ResourceClientBits() is issued before the configuration file is read, meaning that the cached value is from the default, not from the maximum number of clients set in the configuration file.

That obviously causes all sort of issues, including memory corruption and crashes of the Xserver when reaching the default limit value.

To avoid that issue, also keep the LimitClient value, and recompute the ilog2() value if that changes, as on startup when the value is set from the the xorg.conf ServerFlags section.

Fixes: c7311654 - dix: cache ResourceClientBits() value
Closes: #1310 (closed)
Signed-off-by: Olivier Fourdan ofourdan@redhat.com

Edited Jul 12, 2022 by Olivier Fourdan
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: revert-commit-c7311654