1. 07 Jun, 2014 33 commits
  2. 31 May, 2014 7 commits
    • Greg Kroah-Hartman's avatar
      Linux 3.14.5 · 03140572
      Greg Kroah-Hartman authored
      03140572
    • Eric Dumazet's avatar
      net-gro: reset skb->truesize in napi_reuse_skb() · fc2ab6e8
      Eric Dumazet authored
      [ Upstream commit e33d0ba8 ]
      
      Recycling skb always had been very tough...
      
      This time it appears GRO layer can accumulate skb->truesize
      adjustments made by drivers when they attach a fragment to skb.
      
      skb_gro_receive() can only subtract from skb->truesize the used part
      of a fragment.
      
      I spotted this problem seeing TcpExtPruneCalled and
      TcpExtTCPRcvCollapsed that were unexpected with a recent kernel, where
      TCP receive window should be sized properly to accept traffic coming
      from a driver not overshooting skb->truesize.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fc2ab6e8
    • Li RongQing's avatar
      ipv4: initialise the itag variable in __mkroute_input · 242339a2
      Li RongQing authored
      [ Upstream commit fbdc0ad0 ]
      
      the value of itag is a random value from stack, and may not be initiated by
      fib_validate_source, which called fib_combine_itag if CONFIG_IP_ROUTE_CLASSID
      is not set
      
      This will make the cached dst uncertainty
      Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
      Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      242339a2
    • Eric Dumazet's avatar
      ipv6: gro: fix CHECKSUM_COMPLETE support · ff9cfa6b
      Eric Dumazet authored
      [ Upstream commit 4de462ab ]
      
      When GRE support was added in linux-3.14, CHECKSUM_COMPLETE handling
      broke on GRE+IPv6 because we did not update/use the appropriate csum :
      
      GRO layer is supposed to use/update NAPI_GRO_CB(skb)->csum instead of
      skb->csum
      
      Tested using a GRE tunnel and IPv6 traffic. GRO aggregation now happens
      at the first level (ethernet device) instead of being done in gre
      tunnel. Native IPv6+TCP is still properly aggregated.
      
      Fixes: bf5a755f ("net-gre-gro: Add GRE support to the GRO stack")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Jerry Chu <hkchu@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ff9cfa6b
    • Cong Wang's avatar
      net_sched: fix an oops in tcindex filter · 1ff9c00a
      Cong Wang authored
      [ Upstream commit bf63ac73 ]
      
      Kelly reported the following crash:
      
              IP: [<ffffffff817a993d>] tcf_action_exec+0x46/0x90
              PGD 3009067 PUD 300c067 PMD 11ff30067 PTE 800000011634b060
              Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
              CPU: 1 PID: 639 Comm: dhclient Not tainted 3.15.0-rc4+ #342
              Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
              task: ffff8801169ecd00 ti: ffff8800d21b8000 task.ti: ffff8800d21b8000
              RIP: 0010:[<ffffffff817a993d>]  [<ffffffff817a993d>] tcf_action_exec+0x46/0x90
              RSP: 0018:ffff8800d21b9b90  EFLAGS: 00010283
              RAX: 00000000ffffffff RBX: ffff88011634b8e8 RCX: ffff8800cf7133d8
              RDX: ffff88011634b900 RSI: ffff8800cf7133e0 RDI: ffff8800d210f840
              RBP: ffff8800d21b9bb0 R08: ffffffff8287bf60 R09: 0000000000000001
              R10: ffff8800d2b22b24 R11: 0000000000000001 R12: ffff8800d210f840
              R13: ffff8800d21b9c50 R14: ffff8800cf7133e0 R15: ffff8800cad433d8
              FS:  00007f49723e1840(0000) GS:ffff88011a800000(0000) knlGS:0000000000000000
              CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
              CR2: ffff88011634b8f0 CR3: 00000000ce469000 CR4: 00000000000006e0
              Stack:
               ffff8800d2170188 ffff8800d210f840 ffff8800d2171b90 0000000000000000
               ffff8800d21b9be8 ffffffff817c55bb ffff8800d21b9c50 ffff8800d2171b90
               ffff8800d210f840 ffff8800d21b0300 ffff8800d21b9c50 ffff8800d21b9c18
              Call Trace:
               [<ffffffff817c55bb>] tcindex_classify+0x88/0x9b
               [<ffffffff817a7f7d>] tc_classify_compat+0x3e/0x7b
               [<ffffffff817a7fdf>] tc_classify+0x25/0x9f
               [<ffffffff817b0e68>] htb_enqueue+0x55/0x27a
               [<ffffffff817b6c2e>] dsmark_enqueue+0x165/0x1a4
               [<ffffffff81775642>] __dev_queue_xmit+0x35e/0x536
               [<ffffffff8177582a>] dev_queue_xmit+0x10/0x12
               [<ffffffff818f8ecd>] packet_sendmsg+0xb26/0xb9a
               [<ffffffff810b1507>] ? __lock_acquire+0x3ae/0xdf3
               [<ffffffff8175cf08>] __sock_sendmsg_nosec+0x25/0x27
               [<ffffffff8175d916>] sock_aio_write+0xd0/0xe7
               [<ffffffff8117d6b8>] do_sync_write+0x59/0x78
               [<ffffffff8117d84d>] vfs_write+0xb5/0x10a
               [<ffffffff8117d96a>] SyS_write+0x49/0x7f
               [<ffffffff8198e212>] system_call_fastpath+0x16/0x1b
      
      This is because we memcpy struct tcindex_filter_result which contains
      struct tcf_exts, obviously struct list_head can not be simply copied.
      This is a regression introduced by commit 33be6271
      (net_sched: act: use standard struct list_head).
      
      It's not very easy to fix it as the code is a mess:
      
             if (old_r)
                     memcpy(&cr, r, sizeof(cr));
             else {
                     memset(&cr, 0, sizeof(cr));
                     tcf_exts_init(&cr.exts, TCA_TCINDEX_ACT, TCA_TCINDEX_POLICE);
             }
             ...
             tcf_exts_change(tp, &cr.exts, &e);
             ...
             memcpy(r, &cr, sizeof(cr));
      
      the above code should equal to:
      
              tcindex_filter_result_init(&cr);
              if (old_r)
                     cr.res = r->res;
              ...
              if (old_r)
                     tcf_exts_change(tp, &r->exts, &e);
              else
                     tcf_exts_change(tp, &cr.exts, &e);
              ...
              r->res = cr.res;
      
      after this change, since there is no need to copy struct tcf_exts.
      
      And it also fixes other places zero'ing struct's contains struct tcf_exts.
      
      Fixes: commit 33be6271 (net_sched: act: use standard struct list_head)
      Reported-by: default avatarKelly Anderson <kelly@xilka.com>
      Tested-by: default avatarKelly Anderson <kelly@xilka.com>
      Cc: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1ff9c00a
    • Steffen Klassert's avatar
      ip_tunnel: Initialize the fallback device properly · 49da0655
      Steffen Klassert authored
      [ Upstream commit 78ff4be4 ]
      
      We need to initialize the fallback device to have a correct mtu
      set on this device. Otherwise the mtu is set to null and the device
      is unusable.
      
      Fixes: fd58156e ("IPIP: Use ip-tunneling code.")
      Cc: Pravin B Shelar <pshelar@nicira.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      49da0655
    • Antonio Quartulli's avatar
      batman-adv: fix local TT check for outgoing arp requests in DAT · 39f95dfd
      Antonio Quartulli authored
      [ Upstream commit cc2f3386 ]
      
      Change introduced by 88e48d7b
      ("batman-adv: make DAT drop ARP requests targeting local clients")
      implements a check that prevents DAT from using the caching
      mechanism when the client that is supposed to provide a reply
      to an arp request is local.
      
      However change brought by be1db4f6
      ("batman-adv: make the Distributed ARP Table vlan aware")
      has not converted the above check into its vlan aware version
      thus making it useless when the local client is behind a vlan.
      
      Fix the behaviour by properly specifying the vlan when
      checking for a client being local or not.
      Reported-by: default avatarSimon Wunderlich <simon@open-mesh.com>
      Signed-off-by: default avatarAntonio Quartulli <antonio@open-mesh.com>
      Signed-off-by: default avatarMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      39f95dfd