Integrated: 8263743: redundant lock in SSLSocketImpl
Xue-Lei Andrew Fan
xuelei at openjdk.java.net
Thu Mar 25 05:20:39 UTC 2021
On Wed, 17 Mar 2021 17:23:03 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:
> Remove redundant lock in SSLSocketImpl.
>
> In the SSLSocketImpl, there is a socket level lock while reading application data (see readApplicationRecord).
>
> socketLock.lock();
> try {
> plainText = decode(buffer);
> } finally {
> socketLock.unlock();
> }
> If an application data read is in progress, other calling to SSLSocket APIs (for example getUseClientMode() in a handshake complete listener) could be blocked if socket level locks are used.
>
> No new regression test. Simple fix, hard to trigger the deadlock.
This pull request has now been integrated.
Changeset: a678a38d
Author: Xue-Lei Andrew Fan <xuelei at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/a678a38d
Stats: 7 lines in 1 file changed: 0 ins; 6 del; 1 mod
8263743: redundant lock in SSLSocketImpl
Reviewed-by: jnimeh
-------------
PR: https://git.openjdk.java.net/jdk/pull/3053
More information about the security-dev
mailing list