Skip to content

MdeModulePkg/DxeCapsuleLibFmp: Tolerate EFI_ALREADY_STARTED in LockVariable#12511

Merged
mergify[bot] merged 1 commit intotianocore:masterfrom
anandhkrishnau:Anandh/FixCapsuleLib
Apr 30, 2026
Merged

MdeModulePkg/DxeCapsuleLibFmp: Tolerate EFI_ALREADY_STARTED in LockVariable#12511
mergify[bot] merged 1 commit intotianocore:masterfrom
anandhkrishnau:Anandh/FixCapsuleLib

Conversation

@anandhkrishnau
Copy link
Copy Markdown
Contributor

When multiple DXE drivers link DxeCapsuleLib, each driver's constructor calls InitCapsuleVariable() which attempts to lock capsule-related variables. The second instance fails with EFI_ALREADY_STARTED because the policy is already registered, triggering a false ASSERT.

EFI_ALREADY_STARTED from RegisterBasicVariablePolicy means the variable is already locked, which is the desired state. Treat it as success.

  • Breaking change? No
  • Impacts security? No
  • Includes tests? No (validated manually on target hardware)

How This Was Tested

Tested with including the DxeCapsuleLib with multiple DXE drivers

Integration Instructions

N/A

@lgao4 lgao4 added the push Auto push patch series in PR if all checks pass label Apr 30, 2026
@mergify
Copy link
Copy Markdown

mergify Bot commented Apr 30, 2026

Deprecation notice: This pull request comes from a fork and was queued with update_method=rebase and update_bot_account impersonation. This capability will be removed on July 1, 2026. After this date, the merge queue will no longer be able to rebase fork pull requests with this configuration. To avoid disruption, switch to update_method=merge in your queue rule.

@mergify mergify Bot added the queued label Apr 30, 2026
@mergify
Copy link
Copy Markdown

mergify Bot commented Apr 30, 2026

Merge Queue Status

  • Entered queue2026-04-30 01:47 UTC · Rule: default
  • Checks passed · in-place
  • Merged2026-04-30 02:07 UTC · at 4eb739521cfb8ac9bb4710bf0946247707ef61fa · rebase

This pull request spent 20 minutes 46 seconds in the queue, including 20 minutes 21 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
  • any of [🛡 GitHub branch protection]:
    • check-success = tianocore.PatchCheck
    • check-neutral = tianocore.PatchCheck
    • check-skipped = tianocore.PatchCheck
  • any of [🛡 GitHub branch protection]:
    • check-success = ArmVirtPkg - Ubuntu GCC - PR
    • check-neutral = ArmVirtPkg - Ubuntu GCC - PR
    • check-skipped = ArmVirtPkg - Ubuntu GCC - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = EmulatorPkg - Ubuntu GCC - PR
    • check-neutral = EmulatorPkg - Ubuntu GCC - PR
    • check-skipped = EmulatorPkg - Ubuntu GCC - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = EmulatorPkg - Windows VS - PR
    • check-neutral = EmulatorPkg - Windows VS - PR
    • check-skipped = EmulatorPkg - Windows VS - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = OvmfPkg - Ubuntu GCC - PR
    • check-neutral = OvmfPkg - Ubuntu GCC - PR
    • check-skipped = OvmfPkg - Ubuntu GCC - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = OvmfPkg - Windows VS - PR
    • check-neutral = OvmfPkg - Windows VS - PR
    • check-skipped = OvmfPkg - Windows VS - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = Windows VS - PR
    • check-neutral = Windows VS - PR
    • check-skipped = Windows VS - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = Ubuntu GCC - PR
    • check-neutral = Ubuntu GCC - PR
    • check-skipped = Ubuntu GCC - PR
  • any of [🛡 GitHub branch protection]:
    • check-success = Validate Pull Request Formatting
    • check-neutral = Validate Pull Request Formatting
    • check-skipped = Validate Pull Request Formatting
  • any of [🛡 GitHub branch protection]:
    • check-success = ArmVirtPkg - Ubuntu - CLANGPDB
    • check-neutral = ArmVirtPkg - Ubuntu - CLANGPDB
    • check-skipped = ArmVirtPkg - Ubuntu - CLANGPDB
  • any of [🛡 GitHub branch protection]:
    • check-success = OvmfPkg - Ubuntu - CLANGPDB
    • check-neutral = OvmfPkg - Ubuntu - CLANGPDB
    • check-skipped = OvmfPkg - Ubuntu - CLANGPDB
  • any of [🛡 GitHub branch protection]:
    • check-success = Ubuntu - CLANGPDB
    • check-neutral = Ubuntu - CLANGPDB
    • check-skipped = Ubuntu - CLANGPDB
  • any of [🛡 GitHub branch protection]:
    • check-success = Windows - CLANGPDB
    • check-neutral = Windows - CLANGPDB
    • check-skipped = Windows - CLANGPDB
  • any of [🛡 GitHub branch protection]:
    • check-success = EmulatorPkg - Windows - CLANGPDB
    • check-neutral = EmulatorPkg - Windows - CLANGPDB
    • check-skipped = EmulatorPkg - Windows - CLANGPDB

…riable

When multiple DXE drivers link DxeCapsuleLib, each driver's constructor
calls InitCapsuleVariable() which attempts to lock capsule-related
variables. The second instance fails with EFI_ALREADY_STARTED because
the policy is already registered, triggering a false ASSERT.

EFI_ALREADY_STARTED from RegisterBasicVariablePolicy means the variable
is already locked, which is the desired state. Treat it as success.

Signed-off-by: default avatarAnandh krishna U <[email protected]>
@mergify mergify Bot merged commit 3b899d2 into tianocore:master Apr 30, 2026
159 of 162 checks passed
@mergify mergify Bot removed the queued label Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

push Auto push patch series in PR if all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants