Revision ec34232575083fd0f43d3a101e8ebb041b203761 authored by Andrew Vagin on 15 November 2012, 04:03:17 UTC, committed by David S. Miller on 15 November 2012, 22:44:58 UTC
Currently if a socket was repaired with a few packet in a write queue,
a kernel bug may be triggered:

kernel BUG at net/ipv4/tcp_output.c:2330!
RIP: 0010:[<ffffffff8155784f>] tcp_retransmit_skb+0x5ff/0x610

According to the initial realization v3.4-rc2-963-gc0e88ff,
all skb-s should look like already posted. This patch fixes code
according with this sentence.

Here are three points, which were not done in the initial patch:
1. A tcp send head should not be changed
2. Initialize TSO state of a skb
3. Reset the retransmission time

This patch moves logic from tcp_sendmsg to tcp_write_xmit. A packet
passes the ussual way, but isn't sent to network. This patch solves
all described problems and handles tcp_sendpages.

Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: James Morris <jmorris@namei.org>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0da9a0c
History
File Mode Size
bitops
4level-fixup.h -rw-r--r-- 1.0 KB
Kbuild.asm -rw-r--r-- 44 bytes
atomic-long.h -rw-r--r-- 5.1 KB
atomic.h -rw-r--r-- 4.8 KB
atomic64.h -rw-r--r-- 1.8 KB
audit_change_attr.h -rw-r--r-- 419 bytes
audit_dir_write.h -rw-r--r-- 416 bytes
audit_read.h -rw-r--r-- 202 bytes
audit_signal.h -rw-r--r-- 36 bytes
audit_write.h -rw-r--r-- 283 bytes
barrier.h -rw-r--r-- 1.4 KB
bitops.h -rw-r--r-- 1.2 KB
bitsperlong.h -rw-r--r-- 553 bytes
bug.h -rw-r--r-- 5.5 KB
bugs.h -rw-r--r-- 228 bytes
cache.h -rw-r--r-- 345 bytes
cacheflush.h -rw-r--r-- 1.3 KB
checksum.h -rw-r--r-- 2.2 KB
clkdev.h -rw-r--r-- 673 bytes
cmpxchg-local.h -rw-r--r-- 1.4 KB
cmpxchg.h -rw-r--r-- 2.0 KB
cputime.h -rw-r--r-- 1.8 KB
current.h -rw-r--r-- 217 bytes
delay.h -rw-r--r-- 1.1 KB
device.h -rw-r--r-- 245 bytes
div64.h -rw-r--r-- 1.3 KB
dma-coherent.h -rw-r--r-- 1.1 KB
dma-contiguous.h -rw-r--r-- 526 bytes
dma-mapping-broken.h -rw-r--r-- 2.4 KB
dma-mapping-common.h -rw-r--r-- 7.4 KB
dma.h -rw-r--r-- 514 bytes
emergency-restart.h -rw-r--r-- 209 bytes
exec.h -rw-r--r-- 697 bytes
fb.h -rw-r--r-- 232 bytes
ftrace.h -rw-r--r-- 460 bytes
futex.h -rw-r--r-- 1.2 KB
getorder.h -rw-r--r-- 1.4 KB
gpio.h -rw-r--r-- 8.2 KB
hardirq.h -rw-r--r-- 493 bytes
hw_irq.h -rw-r--r-- 270 bytes
ide_iops.h -rw-r--r-- 752 bytes
int-l64.h -rw-r--r-- 871 bytes
int-ll64.h -rw-r--r-- 893 bytes
io-64-nonatomic-hi-lo.h -rw-r--r-- 536 bytes
io-64-nonatomic-lo-hi.h -rw-r--r-- 536 bytes
io.h -rw-r--r-- 8.3 KB
ioctl.h -rw-r--r-- 396 bytes
iomap.h -rw-r--r-- 2.8 KB
irq.h -rw-r--r-- 364 bytes
irq_regs.h -rw-r--r-- 980 bytes
irqflags.h -rw-r--r-- 1.5 KB
kdebug.h -rw-r--r-- 143 bytes
kmap_types.h -rw-r--r-- 159 bytes
kvm_para.h -rw-r--r-- 377 bytes
libata-portmap.h -rw-r--r-- 153 bytes
linkage.h -rw-r--r-- 225 bytes
local.h -rw-r--r-- 2.2 KB
local64.h -rw-r--r-- 3.8 KB
memory_model.h -rw-r--r-- 1.9 KB
mm_hooks.h -rw-r--r-- 425 bytes
mmu.h -rw-r--r-- 329 bytes
mmu_context.h -rw-r--r-- 842 bytes
module.h -rw-r--r-- 1.1 KB
mutex-dec.h -rw-r--r-- 2.9 KB
mutex-null.h -rw-r--r-- 666 bytes
mutex-xchg.h -rw-r--r-- 3.9 KB
mutex.h -rw-r--r-- 256 bytes
page.h -rw-r--r-- 2.5 KB
param.h -rw-r--r-- 328 bytes
parport.h -rw-r--r-- 585 bytes
pci-bridge.h -rw-r--r-- 1.7 KB
pci-dma-compat.h -rw-r--r-- 3.4 KB
pci.h -rw-r--r-- 810 bytes
pci_iomap.h -rw-r--r-- 1.2 KB
percpu.h -rw-r--r-- 3.2 KB
pgalloc.h -rw-r--r-- 303 bytes
pgtable-nopmd.h -rw-r--r-- 1.9 KB
pgtable-nopud.h -rw-r--r-- 1.8 KB
pgtable.h -rw-r--r-- 16.0 KB
ptrace.h -rw-r--r-- 1.6 KB
resource.h -rw-r--r-- 1.0 KB
rtc.h -rw-r--r-- 5.3 KB
rwsem.h -rw-r--r-- 2.9 KB
scatterlist.h -rw-r--r-- 845 bytes
sections.h -rw-r--r-- 1.2 KB
segment.h -rw-r--r-- 249 bytes
serial.h -rw-r--r-- 306 bytes
siginfo.h -rw-r--r-- 911 bytes
signal.h -rw-r--r-- 331 bytes
sizes.h -rw-r--r-- 78 bytes
spinlock.h -rw-r--r-- 290 bytes
statfs.h -rw-r--r-- 130 bytes
string.h -rw-r--r-- 281 bytes
switch_to.h -rw-r--r-- 992 bytes
syscall.h -rw-r--r-- 6.3 KB
syscalls.h -rw-r--r-- 1.6 KB
termios-base.h -rw-r--r-- 2.1 KB
termios.h -rw-r--r-- 2.8 KB
timex.h -rw-r--r-- 469 bytes
tlb.h -rw-r--r-- 5.2 KB
tlbflush.h -rw-r--r-- 446 bytes
topology.h -rw-r--r-- 2.1 KB
uaccess-unaligned.h -rw-r--r-- 733 bytes
uaccess.h -rw-r--r-- 7.4 KB
unaligned.h -rw-r--r-- 907 bytes
unistd.h -rw-r--r-- 647 bytes
user.h -rw-r--r-- 242 bytes
vga.h -rw-r--r-- 548 bytes
vmlinux.lds.h -rw-r--r-- 23.7 KB
word-at-a-time.h -rw-r--r-- 1.2 KB
xor.h -rw-r--r-- 13.6 KB

back to top