All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Alexey Kodanev <alexey.kodanev@oracle.com>
Cc: netdev@vger.kernel.org, vasily.isaenko@oracle.com
Subject: Re: [PATCH v2] net: tcp6: fix double call of tcp_v6_fill_cb()
Date: Thu, 26 Mar 2015 04:46:46 -0700	[thread overview]
Message-ID: <1427370406.25985.129.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <1427358484-16402-1-git-send-email-alexey.kodanev@oracle.com>

On Thu, 2015-03-26 at 11:28 +0300, Alexey Kodanev wrote:
> Regression from the following commit: 2dc49d1680.
> 
> tcp_v6_fill_cb() will be called twice if socket's state changes from
> TCP_TIME_WAIT to TCP_LISTEN. That can result in control buffer data
> corruption because in the second tcp_v6_fill_cb() call it's not copying
> IP6CB(skb) anymore, but 'seq', 'end_seq', etc., so we can get weird and
> unpredictable results. Performance loss of up to 1200% has been observed
> in LTP/vxlan03 test.
> 
> This can be fixed by copying inet6_skb_parm to the beginning of 'cb'
> only if xfrm6_policy_check() and tcp_v6_fill_cb() are going to be
> called again.
> 
> Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
> ---

Thanks Alexey !

Fixes: 2dc49d1680b53 ("tcp6: don't move IP6CB before xfrm6_policy_check()")
Acked-by: Eric Dumazet <edumazet@google.com>

  reply	other threads:[~2015-03-26 11:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  8:28 [PATCH v2] net: tcp6: fix double call of tcp_v6_fill_cb() Alexey Kodanev
2015-03-26 11:46 ` Eric Dumazet [this message]
2015-03-26 14:08 ` Sergei Shtylyov

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=1427370406.25985.129.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=alexey.kodanev@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=vasily.isaenko@oracle.com \
    /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.