Skip to content

Fix lgpo_reg Registry.pol lock races using EnterCriticalPolicySection#69493

Merged
dwoz merged 2 commits into
saltstack:3006.xfrom
twangboy:fix/69492/3006.x
Jun 19, 2026
Merged

Fix lgpo_reg Registry.pol lock races using EnterCriticalPolicySection#69493
dwoz merged 2 commits into
saltstack:3006.xfrom
twangboy:fix/69492/3006.x

Conversation

@twangboy

@twangboy twangboy commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Use EnterCriticalPolicySection/LeaveCriticalPolicySection from userenv.dll to hold the GP critical section across the full read-modify-write cycle in set_value, disable_value, and delete_value. This blocks gpsvc from opening Registry.pol concurrently rather than racing against it.

Create _write_with_retry as a fallback for non-GP lockers (AV, VSS) that do not participate in the GP critical section handshake. Apply retry logic to both Registry.pol and gpt.ini writes.

What issues does this PR fix or reference?

Fixes #69492

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Use EnterCriticalPolicySection/LeaveCriticalPolicySection from userenv.dll
to hold the GP critical section across the full read-modify-write cycle in
set_value, disable_value, and delete_value. This blocks gpsvc from opening
Registry.pol concurrently rather than racing against it.

Create _write_with_retry as a fallback for non-GP lockers (AV, VSS) that
do not participate in the GP critical section handshake. Apply retry logic
to both Registry.pol and gpt.ini writes.
@twangboy twangboy requested a review from a team as a code owner June 19, 2026 19:13
@twangboy twangboy self-assigned this Jun 19, 2026
@twangboy twangboy added test:full Run the full test suite Abandoned labels Jun 19, 2026
@twangboy twangboy added this to the Sulphur v3006.26 milestone Jun 19, 2026
@dwoz dwoz merged commit 78c70aa into saltstack:3006.x Jun 19, 2026
887 of 901 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants