From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: dccp@vger.kernel.org
Subject: Re: [PATCH 3/3] DCCP: fix connect() race condition upon short connections
Date: Tue, 13 Dec 2005 13:07:21 +0000 [thread overview]
Message-ID: <39e6f6c70512130507t5069e6cs38f5e85cac73f2f4@mail.gmail.com> (raw)
In-Reply-To: <20051213093402.GC8532@tribal.sorbonet.org>
On 12/13/05, Andrea Bittau <a.bittau@cs.ucl.ac.uk> wrote:
> The connect system call will initiate a connection, poll whether the connection
> has occured and right before returning, it will check whether the connection was
> shut-down. In such cases, it will return -1. If a connection is really short,
> it is possible that the connection occurs and terminates before connect()
> returns. Upon checking that the connection is closed, connect() will
> incorrectly return -1 when the transfer did occur.
>
> I was able to reproduce this race condition consistently by having a server send
> 3 packets upon connection and disconnect right after. I believe this issue
> might exist in TCP too although mitigated by the higher number of CLOSE states.
>
> I believe there is a better solution than the one I proposed [simplest I could
> think of].
Yes, I believe we should take a look at one that doesn't involves
tasklets, will try to come up with something today, but anyway, thanks
for pointing out the issue (again)!
- Arnaldo
prev parent reply other threads:[~2005-12-13 13:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-13 9:34 [PATCH 3/3] DCCP: fix connect() race condition upon short connections Andrea Bittau
2005-12-13 13:07 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39e6f6c70512130507t5069e6cs38f5e85cac73f2f4@mail.gmail.com \
--to=acme@ghostprotocols.net \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox