Skip to content

Conversation

@luke-jr
Copy link
Member

@luke-jr luke-jr commented Sep 24, 2022

(Clean merge of #26130 to 24.x branch)

cs_desc_main is typically locked within scope of a cs_wallet lock, but:

CWallet::IsLocked locks cs_wallet
...called from DescriptorScriptPubKeyMan::GetKeys
...called from DescriptorScriptPubKeyMan::GetSigningProvider which locks cs_desc_main first, but has no access to cs_wallet
...called from DescriptorScriptPubKeyMan::SignMessage
...called from CWallet::SignMessage which can access and lock cs_wallet

Resolve the out of order locks by grabbing cs_wallet in CWallet::SignMessage first
@fanquake fanquake added this to the 24.0 milestone Sep 24, 2022
@maflcko maflcko merged commit ca8d2c4 into bitcoin:24.x Sep 25, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants