Summary: | Screen-specific privates can not be used in CloseScreen | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Michal Srb <michalsrb> | ||||||
Component: | Server/General | Assignee: | Xorg Project Team <xorg-team> | ||||||
Status: | RESOLVED MOVED | QA Contact: | Xorg Project Team <xorg-team> | ||||||
Severity: | normal | ||||||||
Priority: | medium | CC: | anjala.thulasiram | ||||||
Version: | git | ||||||||
Hardware: | Other | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
i915 platform: | i915 features: | ||||||||
Attachments: |
|
Description
Michal Srb
2018-11-15 15:49:36 UTC
Created attachment 142480 [details] [review] dix: Track DevPrivateKey initialization by generation Here is first possible solution. It changes the "initialized" Bool into "initializedInGeneration" counter. It is initialized to zero and set to the current serverGeneration when the key is registered. A key is considered initialized if its initializedInGeneration counter equals the current serverGeneration. That way no explicit resetting is needed and all keys can be used until the very end. Those that are still alive at the restart become automatically uninitialized. One issue is that it changes API because the structure is exposed in the privates.h file and also ABI because it is accessed by some of the inline functions in that file. The size of the struct _DevPrivateKeyRec remains the same because the counter is unsigned int and the flag used to be Bool=int. Created attachment 142481 [details] [review] dix: Ignore initialized flag for screen-specific privates Here is second possible solution. In this case the "initialized" flag is never set to FALSE for the screen-specific keys, so they can be used even inside CloseScreen function. The dixRegisterScreenSpecificPrivateKey does not use it to determine if a key was already registered, instead it searches the list of already registered keys. I think this does not break any API or ABI. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/xserver/issues/615. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.