x/crypto/acme/autocert: lock usage around certState is bogus and error prone #17749
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The use of locks around certState is pretty confusing. The certState method returns the state value either locked or not, which means the call site has no idea about what it got. Then, there's a
locked
boolean field which is used to decide whether to lock it again or release the existing lock. That's both error prone and wrong from a concurrent memory access perspective.The text was updated successfully, but these errors were encountered: