Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Issue 10382186: Prevent the infinite loop inside SSLClientSocketNSS::OnSendComplete. (Closed)

Created:
8 years, 7 months ago by wtc
Modified:
8 years, 7 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Johnny(Jianning) Ding
Visibility:
Public.

Description

Prevent the infinite loop inside SSLClientSocketNSS::OnSendComplete. Two fixes are added. 1) We stay in the loop only if we will call DoPayloadRead or DoPayloadWrite in the next iteration. 2) Don't call BufferRecv again if BufferRecv has reported EOF before. Each fix alone prevents the infinite loop. The second fix is less risky. If necessary, we can go with just the second fix. R=rsleevi@chromium.org BUG=127822 TEST=SSLServerSocketTest.WriteAfterPeerClose in net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137485

Patch Set 1 #

Patch Set 2 : Fix comments #

Patch Set 3 : Add SSLClientSocketOpenSSL fix #

Total comments: 9

Patch Set 4 : Make changes suggested by rsleevi, exclude SSLClientSocketOpenSSL from this CL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -8 lines) Patch
M net/socket/ssl_client_socket_nss.h View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_nss.cc View 1 2 3 8 chunks +12 lines, -4 lines 0 comments Download
M net/socket/ssl_server_socket_unittest.cc View 1 2 3 7 chunks +100 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
wtc
rsleevi: please review the entire CL. hclam: please review just the changes to the FakeDataChannel ...
8 years, 7 months ago (2012-05-15 23:24:24 UTC) #1
wtc
jnd: I found that SSLServerSocketOpenSSL isn't implemented, so I can't run my regression test with ...
8 years, 7 months ago (2012-05-16 00:36:53 UTC) #2
Ryan Sleevi
http://codereview.chromium.org/10382186/diff/1009/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): http://codereview.chromium.org/10382186/diff/1009/net/socket/ssl_client_socket_nss.cc#newcode1224 net/socket/ssl_client_socket_nss.cc:1224: (user_read_buf_ || user_write_buf_) && Double checking my understanding here. ...
8 years, 7 months ago (2012-05-16 02:13:02 UTC) #3
Ryan Sleevi
http://codereview.chromium.org/10382186/diff/1009/net/socket/ssl_server_socket_unittest.cc File net/socket/ssl_server_socket_unittest.cc (right): http://codereview.chromium.org/10382186/diff/1009/net/socket/ssl_server_socket_unittest.cc#newcode479 net/socket/ssl_server_socket_unittest.cc:479: TEST_F(SSLServerSocketTest, WriteAfterPeerClose) { Just to make sure - this ...
8 years, 7 months ago (2012-05-16 02:16:46 UTC) #4
wtc
rsleevi: please review patch set 4. Thank you for your comments. I made all the ...
8 years, 7 months ago (2012-05-16 03:04:29 UTC) #5
Ryan Sleevi
lgtm http://codereview.chromium.org/10382186/diff/1009/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): http://codereview.chromium.org/10382186/diff/1009/net/socket/ssl_client_socket_nss.cc#newcode1224 net/socket/ssl_client_socket_nss.cc:1224: (user_read_buf_ || user_write_buf_) && On 2012/05/16 03:04:29, wtc ...
8 years, 7 months ago (2012-05-16 03:44:11 UTC) #6
wtc
http://codereview.chromium.org/10382186/diff/1009/net/socket/ssl_client_socket_nss.cc File net/socket/ssl_client_socket_nss.cc (right): http://codereview.chromium.org/10382186/diff/1009/net/socket/ssl_client_socket_nss.cc#newcode1224 net/socket/ssl_client_socket_nss.cc:1224: (user_read_buf_ || user_write_buf_) && On 2012/05/16 03:44:11, Ryan Sleevi ...
8 years, 7 months ago (2012-05-16 17:51:52 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wtc@chromium.org/10382186/10006
8 years, 7 months ago (2012-05-16 18:00:11 UTC) #8
Alpha Left Google
LGTM on the test.
8 years, 7 months ago (2012-05-16 19:31:10 UTC) #9
commit-bot: I haz the power
8 years, 7 months ago (2012-05-16 19:36:33 UTC) #10
Change committed as 137485

Powered by Google App Engine
This is Rietveld 408576698