Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(89)

Issue 7309050: code review 7309050: net: do not use RLock around Accept (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by rsc
Modified:
12 years, 4 months ago
Reviewers:
CC:
golang-dev, dave_cheney.net, iant, mikio
Visibility:
Public.

Description

net: do not use RLock around Accept It might be non-blocking, but it also might be blocking. Cannot take the chance, as Accept might block indefinitely and make it impossible to acquire ForkLock exclusively (during fork+exec). Fixes issue 4737.

Patch Set 1 #

Patch Set 2 : diff -r 8d71734a0cb0 https://go.googlecode.com/hg #

Patch Set 3 : diff -r 8d71734a0cb0 https://go.googlecode.com/hg #

Patch Set 4 : diff -r 8d71734a0cb0 https://go.googlecode.com/hg #

Patch Set 5 : diff -r 052cab218361 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -6 lines) Patch
M src/pkg/net/fd_unix.go View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M src/pkg/net/sock_cloexec.go View 1 1 chunk +3 lines, -3 lines 0 comments Download
M src/pkg/net/sys_cloexec.go View 1 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 8
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg
12 years, 5 months ago (2013-02-05 20:31:32 UTC) #1
dave_cheney.net
Your comment about kernels < 2.6.28 is relevant. Maybe it is time to bite the ...
12 years, 5 months ago (2013-02-05 20:36:10 UTC) #2
rsc
The CL is still necessary on all the BSDs, so I don't see the point ...
12 years, 5 months ago (2013-02-05 20:38:22 UTC) #3
rsc
Hello golang-dev@googlegroups.com, dave@cheney.net (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 5 months ago (2013-02-05 20:40:34 UTC) #4
dave_cheney.net
Sure. I was not clear in my previous reply. I was not proposing we drop ...
12 years, 5 months ago (2013-02-05 20:55:56 UTC) #5
iant
LGTM
12 years, 5 months ago (2013-02-05 22:04:17 UTC) #6
mikio
LGTM
12 years, 5 months ago (2013-02-08 03:16:46 UTC) #7
rsc
12 years, 5 months ago (2013-02-08 03:45:22 UTC) #8
*** Submitted as https://code.google.com/p/go/source/detail?r=a33346cdc901 ***

net: do not use RLock around Accept

It might be non-blocking, but it also might be blocking.
Cannot take the chance, as Accept might block indefinitely
and make it impossible to acquire ForkLock exclusively
(during fork+exec).

Fixes issue 4737.

R=golang-dev, dave, iant, mikioh.mikioh
CC=golang-dev
https://codereview.appspot.com/7309050
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b