Skip to content
  1. Oct 09, 2013
  2. Oct 08, 2013
  3. Oct 05, 2013
    • Eric Dumazet's avatar
      tcp: do not forget FIN in tcp_shifted_skb() · 5e8a402f
      Eric Dumazet authored
      Yuchung found following problem :
      
       There are bugs in the SACK processing code, merging part in
       tcp_shift_skb_data(), that incorrectly resets or ignores the sacked
       skbs FIN flag. When a receiver first SACK the FIN sequence, and later
       throw away ofo queue (e.g., sack-reneging), the sender will stop
       retransmitting the FIN flag, and hangs forever.
      
      Following packetdrill test can be used to reproduce the bug.
      
      $ cat sack-merge-bug.pkt
      `sysctl -q net.ipv4.tcp_fack=0`
      
      // Establish a connection and send 10 MSS.
      0.000 socket(..., SOCK_STREAM, IPPROTO_TCP) = 3
      +.000 setsockopt(3, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
      +.000 bind(3, ..., ...) = 0
      +.000 listen(3, 1) = 0
      
      +.050 < S 0:0(0) win 32792 <mss 1000,sackOK,nop,nop,nop,wscale 7>
      +.000 > S. 0:0(0) ack 1 <mss 1460,nop,nop,sackOK,nop,wscale 6>
      +.001 < . 1:1(0) ack 1 win 1024
      +.000 accept(3, ..., ...) = 4
      
      +.100 write(4, ..., 12000) = 12000
      +.000 shutdown(4, SHUT_WR) = 0
      +.000 > . 1:10001(10000) ack 1
      +.050 < . 1:1(0) ack 2001 win 257
      +.000 > FP. 10001:12001(2000) ack 1
      +.050 < . 1:1(0) ack 2001 win 257 <sack 10001:11001,nop,nop>
      +.050 < . 1:1(0) ack 2001 win 257 <sack 10001:12002,nop,nop>
      // SACK reneg
      +.050 < . 1:1(0) ack 12001 win 257
      +0 %{ print "unacked: ",tcpi_unacked }%
      +5 %{ print "" }%
      
      First, a typo inverted left/right of one OR operation, then
      code forgot to advance end_seq if the merged skb carried FIN.
      
      Bug was added in 2.6.29 by commit 832d11c5
      
      
      ("tcp: Try to restore large SKBs while SACK processing")
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
      Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
      Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Acked-by: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e8a402f
  4. Oct 04, 2013
  5. Oct 03, 2013
    • David S. Miller's avatar
      Merge branch 'mv643xx' · 569943d0
      David S. Miller authored
      
      
      Sebastian Hesselbarth says:
      
      ====================
      This patch set comprises some one-liners to fix issues with repeated
      loading and unloading of a modular mv643xx_eth driver.
      
      First two patches take care of the periodic port statistic timer, that
      updates statistics by reading port registers using add_timer/mod_timer.
      
      Patch 1 moves timer re-schedule from mib_counters_update to the timer
      callback. As mib_counters_update is also called from non-timer context,
      this ensures the timer is reactivated from timer context only.
      
      Patch 2 moves initial timer schedule from _probe() time to right before
      the port is actually started as the corresponding del_timer_sync is at
      _stop() time. This fixes a regression, where unloading the driver from a
      non-started eth device can cause the timer to access deallocated mem.
      
      Patch 3 adds an assignment of the ports device_node to the corresponding
      self-created platform_device. This is required to allow fixups based on
      the device_node's compatible string later. Actually, it is also a potential
      regression because we already check compatible string for Kirkwood, but
      does not (yet) rely on the fixup.
      
      All patches are based on v3.12-rc3 and have been tested on Kirkwood-based
      Seagate Dockstar.
      
      Patches 1 and 2 can also possibly queued up for -stable.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      569943d0
    • Sebastian Hesselbarth's avatar
      net: mv643xx_eth: fix missing device_node for port devices · b5d82db8
      Sebastian Hesselbarth authored
      
      
      DT-based mv643xx_eth probes and creates platform_devices for the
      port devices on its own. To allow fixups for ports based on the
      device_node, we need to set .of_node of the corresponding device
      with the correct node.
      
      Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b5d82db8
    • Sebastian Hesselbarth's avatar
      net: mv643xx_eth: fix orphaned statistics timer crash · f564412c
      Sebastian Hesselbarth authored
      
      
      The periodic statistics timer gets started at port _probe() time, but
      is stopped on _stop() only. In a modular environment, this can cause
      the timer to access already deallocated memory, if the module is unloaded
      without starting the eth device. To fix this, we add the timer right
      before the port is started, instead of at _probe() time.
      
      Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f564412c
    • Sebastian Hesselbarth's avatar
      net: mv643xx_eth: update statistics timer from timer context only · 041b4ddb
      Sebastian Hesselbarth authored
      
      
      Each port driver installs a periodic timer to update port statistics
      by calling mib_counters_update. As mib_counters_update is also called
      from non-timer context, we should not reschedule the timer there but
      rather move it to timer-only context.
      
      Signed-off-by: default avatarSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Acked-by: default avatarJason Cooper <jason@lakedaemon.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      041b4ddb
    • François Cachereul's avatar
      l2tp: fix kernel panic when using IPv4-mapped IPv6 addresses · e18503f4
      François Cachereul authored
      
      
      IPv4 mapped addresses cause kernel panic.
      The patch juste check whether the IPv6 address is an IPv4 mapped
      address. If so, use IPv4 API instead of IPv6.
      
      [  940.026915] general protection fault: 0000 [#1]
      [  940.026915] Modules linked in: l2tp_ppp l2tp_netlink l2tp_core pppox ppp_generic slhc loop psmouse
      [  940.026915] CPU: 0 PID: 3184 Comm: memcheck-amd64- Not tainted 3.11.0+ #1
      [  940.026915] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
      [  940.026915] task: ffff880007130e20 ti: ffff88000737e000 task.ti: ffff88000737e000
      [  940.026915] RIP: 0010:[<ffffffff81333780>]  [<ffffffff81333780>] ip6_xmit+0x276/0x326
      [  940.026915] RSP: 0018:ffff88000737fd28  EFLAGS: 00010286
      [  940.026915] RAX: c748521a75ceff48 RBX: ffff880000c30800 RCX: 0000000000000000
      [  940.026915] RDX: ffff88000075cc4e RSI: 0000000000000028 RDI: ffff8800060e5a40
      [  940.026915] RBP: ffff8800060e5a40 R08: 0000000000000000 R09: ffff88000075cc90
      [  940.026915] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88000737fda0
      [  940.026915] R13: 0000000000000000 R14: 0000000000002000 R15: ffff880005d3b580
      [  940.026915] FS:  00007f163dc5e800(0000) GS:ffffffff81623000(0000) knlGS:0000000000000000
      [  940.026915] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  940.026915] CR2: 00000004032dc940 CR3: 0000000005c25000 CR4: 00000000000006f0
      [  940.026915] Stack:
      [  940.026915]  ffff88000075cc4e ffffffff81694e90 ffff880000c30b38 0000000000000020
      [  940.026915]  11000000523c4bac ffff88000737fdb4 0000000000000000 ffff880000c30800
      [  940.026915]  ffff880005d3b580 ffff880000c30b38 ffff8800060e5a40 0000000000000020
      [  940.026915] Call Trace:
      [  940.026915]  [<ffffffff81356cc3>] ? inet6_csk_xmit+0xa4/0xc4
      [  940.026915]  [<ffffffffa0038535>] ? l2tp_xmit_skb+0x503/0x55a [l2tp_core]
      [  940.026915]  [<ffffffff812b8d3b>] ? pskb_expand_head+0x161/0x214
      [  940.026915]  [<ffffffffa003e91d>] ? pppol2tp_xmit+0xf2/0x143 [l2tp_ppp]
      [  940.026915]  [<ffffffffa00292e0>] ? ppp_channel_push+0x36/0x8b [ppp_generic]
      [  940.026915]  [<ffffffffa00293fe>] ? ppp_write+0xaf/0xc5 [ppp_generic]
      [  940.026915]  [<ffffffff8110ead4>] ? vfs_write+0xa2/0x106
      [  940.026915]  [<ffffffff8110edd6>] ? SyS_write+0x56/0x8a
      [  940.026915]  [<ffffffff81378ac0>] ? system_call_fastpath+0x16/0x1b
      [  940.026915] Code: 00 49 8b 8f d8 00 00 00 66 83 7c 11 02 00 74 60 49
      8b 47 58 48 83 e0 fe 48 8b 80 18 01 00 00 48 85 c0 74 13 48 8b 80 78 02
      00 00 <48> ff 40 28 41 8b 57 68 48 01 50 30 48 8b 54 24 08 49 c7 c1 51
      [  940.026915] RIP  [<ffffffff81333780>] ip6_xmit+0x276/0x326
      [  940.026915]  RSP <ffff88000737fd28>
      [  940.057945] ---[ end trace be8aba9a61c8b7f3 ]---
      [  940.058583] Kernel panic - not syncing: Fatal exception in interrupt
      
      Signed-off-by: default avatarFrançois CACHEREUL <f.cachereul@alphalink.fr>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e18503f4
    • Eric Dumazet's avatar
      net: do not call sock_put() on TIMEWAIT sockets · 80ad1d61
      Eric Dumazet authored
      commit 3ab5aee7
      
       ("net: Convert TCP & DCCP hash tables to use RCU /
      hlist_nulls") incorrectly used sock_put() on TIMEWAIT sockets.
      
      We should instead use inet_twsk_put()
      
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      80ad1d61
    • Andy Gospodarek's avatar
      bonding: update MAINTAINERS · 28ad7b06
      Andy Gospodarek authored
      
      
      Veaceslav has been doing a significant amount of work on bonding lately and
      reached out to me about being a maintainer.  After discussing this with him, I
      think he would be a good fit as a bonding maintainer.
      
      Signed-off-by: default avatarAndy Gospodarek <andy@greyhouse.net>
      Acked-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarJay Vosburgh <fubar@us.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      28ad7b06
    • stephen hemminger's avatar
      tc: export tc_defact.h to userspace · 5bc3db5c
      stephen hemminger authored
      
      
      Jamal sent patch to add tc user simple actions to iproute2
      but required header was not being exported.
      
      Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5bc3db5c