All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neal Cardwell <ncardwell@google.com>
To: David Miller <davem@davemloft.net>
Cc: Netdev <netdev@vger.kernel.org>
Subject: Re: inet_diag_dump_icsk() change seems bogus...
Date: Sun, 2 Feb 2014 10:43:10 -0500	[thread overview]
Message-ID: <CADVnQynq6tfd6Hdg0iqD4Wpm805mVXwFT-VUCsWT6YUxo2=wbQ@mail.gmail.com> (raw)
In-Reply-To: <20140202.004538.1011276314292086521.davem@davemloft.net>

Hi David,

That was true in 3.12 and earlier, but AFAICT since Eric's 05dbc7b
("tcp/dccp: remove twchain") in 3.13-rc1, there is no head->twchain,
and instead all the connections (both tcp_sock and timewait flavor)
are on the head->chain, so that we do need to check for timewait
sockets. :-)

neal


On Sun, Feb 2, 2014 at 3:45 AM, David Miller <davem@davemloft.net> wrote:
>
> Upon further review, commit 70315d22d3c7383f9a508d0aab21e2eb35b2303a
> ("inet_diag: fix inet_diag_dump_icsk() to use correct state for
> timewait sockets") doesn't seem valid to me.
>
> Take a close look at get_tcp4_sock() and get_timewait4_sock() which
> you reference in your commit message.
>
> The former always gets it's socket from head->chain and the latter
> always gets it's socket from head->twchain.
>
> Yet in this inet_diag_dump_icsk() change, you're changing the
> head->chain iterator to check for timewait sockets.  That doesn't
> seem possible.
>
> Only head->twchain holds timewait sockets, and this code was handling
> it correctly already.
>
> What gives?

  reply	other threads:[~2014-02-02 15:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-02  8:45 inet_diag_dump_icsk() change seems bogus David Miller
2014-02-02 15:43 ` Neal Cardwell [this message]
2014-02-02 18:52   ` Eric Dumazet
2014-02-02 18:59     ` Neal Cardwell
2014-02-02 21:03       ` David Miller
2014-02-03  1:41         ` Neal Cardwell
2014-02-02 21:00   ` David Miller

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='CADVnQynq6tfd6Hdg0iqD4Wpm805mVXwFT-VUCsWT6YUxo2=wbQ@mail.gmail.com' \
    --to=ncardwell@google.com \
    --cc=davem@davemloft.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.