Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: subramanian.vijay@gmail.com, therbert@google.com, netdev@vger.kernel.org
Subject: Re: Bug in computing data_len in tcp_sendmsg?
Date: Fri, 02 Dec 2011 21:22:49 +0100	[thread overview]
Message-ID: <1322857369.2762.63.camel@edumazet-laptop> (raw)
In-Reply-To: <20111202.134040.638198723589712419.davem@davemloft.net>

Le vendredi 02 décembre 2011 à 13:40 -0500, David Miller a écrit :

> Yes, for non-SG this always was technically possible.
> 

Yes this can, I reproduced it very easily.

I find this hard to believe...

[ 2179.697991] ------------[ cut here ]------------
[ 2179.698000] WARNING: at net/ipv4/tcp_output.c:850 tcp_transmit_skb+0x846/0x8f0()
[ 2179.698001] Hardware name: ProLiant BL460c G6
[ 2179.698011] Pid: 0, comm: swapper Tainted: G        W    3.2.0-rc2+ #187
[ 2179.698012] Call Trace:
[ 2179.698014]  <IRQ>  [<ffffffff8104715f>] warn_slowpath_common+0x7f/0xc0
[ 2179.698020]  [<ffffffff810471ba>] warn_slowpath_null+0x1a/0x20
[ 2179.698022]  [<ffffffff815d8386>] tcp_transmit_skb+0x846/0x8f0
[ 2179.698025]  [<ffffffff815d9621>] tcp_retransmit_skb+0x1a1/0x5f0
[ 2179.698027]  [<ffffffff815daf5d>] tcp_retransmit_timer+0x1bd/0x640
[ 2179.698030]  [<ffffffff815db578>] tcp_write_timer+0x198/0x200
[ 2179.698034]  [<ffffffff810579bf>] run_timer_softirq+0x12f/0x3e0
[ 2179.698039]  [<ffffffff81295924>] ? timerqueue_add+0x74/0xc0
[ 2179.698041]  [<ffffffff815db3e0>] ? tcp_retransmit_timer+0x640/0x640
[ 2179.698045]  [<ffffffff810753b5>] ? ktime_get+0x65/0xe0
[ 2179.698047]  [<ffffffff8104e929>] __do_softirq+0xa9/0x240
[ 2179.698050]  [<ffffffff81075b76>] ? do_timer+0x2b6/0x480
[ 2179.698053]  [<ffffffff8106fb90>] ? hrtimer_interrupt+0x130/0x220
[ 2179.698057]  [<ffffffff816d526c>] call_softirq+0x1c/0x30
[ 2179.698061]  [<ffffffff81004115>] do_softirq+0x55/0x90
[ 2179.698063]  [<ffffffff8104edde>] irq_exit+0x9e/0xc0
[ 2179.698066]  [<ffffffff816d5a3e>] smp_apic_timer_interrupt+0x6e/0x99
[ 2179.698068]  [<ffffffff816d3d8b>] apic_timer_interrupt+0x6b/0x70



diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 58f69ac..92ce7c3 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -847,6 +847,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it,
 
 	/* Build TCP header and checksum it. */
 	th = tcp_hdr(skb);
+	WARN_ON((((unsigned long)th) & 3) != 0);
 	th->source		= inet->inet_sport;
 	th->dest		= inet->inet_dport;
 	th->seq			= htonl(tcb->seq);

  reply	other threads:[~2011-12-02 20:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-01  1:48 Bug in computing data_len in tcp_sendmsg? Tom Herbert
2011-12-01  3:42 ` Eric Dumazet
2011-12-01  4:06   ` Tom Herbert
2011-12-01  4:16     ` David Miller
2011-12-01  4:17     ` Eric Dumazet
2011-12-01  5:09       ` Tom Herbert
2011-12-01  9:15         ` Eric Dumazet
2011-12-01 17:29           ` Jesse Brandeburg
2011-12-01 18:04             ` David Miller
2011-12-01 20:37             ` Eric Dumazet
2011-12-01 22:18       ` Vijay Subramanian
2011-12-01 22:30         ` Eric Dumazet
2011-12-02  6:18           ` Vijay Subramanian
2011-12-02 11:59             ` Eric Dumazet
2011-12-02 15:44               ` Eric Dumazet
2011-12-02 16:05                 ` Eric Dumazet
2011-12-02 18:13                   ` David Miller
2011-12-02 18:36                     ` Eric Dumazet
2011-12-02 18:40                       ` David Miller
2011-12-02 20:22                         ` Eric Dumazet [this message]
2011-12-02 20:24                           ` David Miller
2011-12-02 20:45                             ` Eric Dumazet
2011-12-02 20:48                               ` Eric Dumazet
2011-12-02 21:30                               ` David Miller
2011-12-03 15:09                                 ` Eric Dumazet
2011-12-04  7:39                                   ` [PATCH] tcp: take care of misalignments Eric Dumazet
2011-12-04 18:21                                     ` David Miller
2011-12-04 18:51                                       ` Eric Dumazet
2011-12-05 23:45                                         ` 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=1322857369.2762.63.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=subramanian.vijay@gmail.com \
    --cc=therbert@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox