Netdev List
 help / color / mirror / Atom feed
From: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
To: Dmitry Popov <dp@highloadlab.com>, netdev@vger.kernel.org
Subject: Re: [PATCH 5/5] tcp: ipv4 listen state scaled
Date: Wed, 27 Oct 2010 19:04:34 +0400	[thread overview]
Message-ID: <20101027150434.GA13121@ms2.inr.ac.ru> (raw)
In-Reply-To: <AANLkTikRsOevLBHn0xb0S_YvfPMWpAdw373bxQUc+xbV@mail.gmail.com>

Hello!

It looks like there is at least one hole here.

You take lock, check syn table and drop lock in tcp_v4_hnd_req().
Then you immediately enter tcp_v4_conn_request() and grab lock again.
Oops, in the tiny hole while lock was dropped the request can be already
created (even funnier, the whole socket can be already created and even accepted).
So, if you drop lock, you have to restart the whole tcp_v4_rcv_listen()
(which seems to be impossible without additional tricks)

Alexey

  reply	other threads:[~2010-10-27 15:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 13:32 [PATCH 5/5] tcp: ipv4 listen state scaled Dmitry Popov
2010-10-27 15:04 ` Alexey Kuznetsov [this message]
2010-10-27 16:44   ` Dmitry Popov

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=20101027150434.GA13121@ms2.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --cc=dp@highloadlab.com \
    --cc=netdev@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