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

Issue 75930043: code review 75930043: net: avoid multiple calling of syscall connect on Unix ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by mikio
Modified:
10 years ago
Reviewers:
jsing
CC:
jsing, golang-codereviews
Visibility:
Public.

Description

net: avoid multiple calling of syscall connect on Unix variants The previous fix CL 69340044 still leaves a possibility of it. This CL prevents the kernel, especially DragonFly BSD, from performing unpredictable asynchronous connection establishment on stream-based transport layer protocol sockets. Update issue 7541 Update issue 7474

Patch Set 1 : diff -r 08dcdcdb757b https://code.google.com/p/go #

Total comments: 6

Patch Set 2 : diff -r f5c4eb0bd254 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -33 lines) Patch
M src/pkg/net/fd_unix.go View 1 1 chunk +29 lines, -33 lines 0 comments Download

Messages

Total messages: 4
mikio
Hello jsing@google.com (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
10 years, 1 month ago (2014-03-14 08:23:43 UTC) #1
mikio
Hi Joel, Not sure the reason but somehow removing the second connect syscall makes dragonfly ...
10 years, 1 month ago (2014-03-14 08:29:45 UTC) #2
jsing
LGTM Presuming that it has been tested on various platforms. https://codereview.appspot.com/75930043/diff/20002/src/pkg/net/fd_unix.go File src/pkg/net/fd_unix.go (right): https://codereview.appspot.com/75930043/diff/20002/src/pkg/net/fd_unix.go#newcode81 ...
10 years ago (2014-03-25 11:49:41 UTC) #3
mikio
10 years ago (2014-03-26 02:43:17 UTC) #4
*** Submitted as https://code.google.com/p/go/source/detail?r=5f662f12d550 ***

net: avoid multiple calling of syscall connect on Unix variants

The previous fix CL 69340044 still leaves a possibility of it.
This CL prevents the kernel, especially DragonFly BSD, from
performing unpredictable asynchronous connection establishment
on stream-based transport layer protocol sockets.

Update issue 7541
Update issue 7474

LGTM=jsing
R=jsing
CC=golang-codereviews
https://codereview.appspot.com/75930043

https://codereview.appspot.com/75930043/diff/20002/src/pkg/net/fd_unix.go
File src/pkg/net/fd_unix.go (right):

https://codereview.appspot.com/75930043/diff/20002/src/pkg/net/fd_unix.go#new...
src/pkg/net/fd_unix.go:81: case syscall.EINPROGRESS, syscall.EALREADY,
syscall.EINTR:
On 2014/03/25 11:49:41, jsing wrote:
> Nit: This may be more readable with this as the first case (i.e. first case is
> do nothing, second is return nil, third is return err).

Done.

https://codereview.appspot.com/75930043/diff/20002/src/pkg/net/fd_unix.go#new...
src/pkg/net/fd_unix.go:111: switch err = syscall.Errno(nerr); err {
On 2014/03/25 11:49:41, jsing wrote:
> You should be able to use := here.

Done.

https://codereview.appspot.com/75930043/diff/20002/src/pkg/net/fd_unix.go#new...
src/pkg/net/fd_unix.go:114: case syscall.EINPROGRESS, syscall.EALREADY,
syscall.EINTR:
On 2014/03/25 11:49:41, jsing wrote:
> Same here.

Done.
Sign in to reply to this message.

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