Skip to content

Conversation

@rvagg
Copy link
Member

Cherry-pick of #2723 for v0.12

/R=@bnoordhuis, @indutny

It was pointed out by Zhou Ran that the Windows XP implementation of uv_rwlock_rdlock() and friends may unlock the inner write mutex on a different thread than the one that locked it, resulting in undefined behavior. The only place that uses rwlocks is the crypto module. Make that use normal (simple) mutexes instead. OpenSSL's critical sections are generally very short, with exclusive access outnumbering shared access by a factor of three or more, so it's not as if using rwlocks gives a decisive performance advantage. PR-URL: nodejs#2723 Reviewed-By: Fedor Indutny <[email protected]>
@rvaggrvagg changed the title crypto: replace rwlocks with simple mutexescrypto: replace rwlocks with simple mutexes (v0.12)Sep 11, 2015
@indutny
Copy link
Member

LGTM

@rvagg
Copy link
MemberAuthor

@rvaggrvagg merged commit 071c860 into nodejs:v0.12Sep 11, 2015
@ChALkeRChALkeR added crypto Issues and PRs related to the crypto subsystem. land-on-v0.12 labels Sep 11, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cryptoIssues and PRs related to the crypto subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@rvagg@indutny@ChALkeR@bnoordhuis