1. 11 Dec, 2013 6 commits
  2. 10 Dec, 2013 8 commits
  3. 07 Dec, 2013 2 commits
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: fix missing rules flushing per table · cf9dc09d
      Pablo Neira Ayuso authored
      This patch allows you to atomically remove all rules stored in
      a table via the NFT_MSG_DELRULE command. You only need to indicate
      the specific table and no chain to flush all rules stored in that
      table.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      cf9dc09d
    • Sergey Popovich's avatar
      netfilter: xt_hashlimit: fix proc entry leak in netns destroy path · b4ef4ce0
      Sergey Popovich authored
      In (32263dd1 netfilter: xt_hashlimit: fix namespace destroy path)
      the hashlimit_net_exit() function is always called right before
      hashlimit_mt_destroy() to release netns data. If you use xt_hashlimit
      with IPv4 and IPv6 together, this produces the following splat via
      netconsole in the netns destroy path:
      
       Pid: 9499, comm: kworker/u:0 Tainted: G        WC O 3.2.0-5-netctl-amd64-core2
       Call Trace:
        [<ffffffff8104708d>] ? warn_slowpath_common+0x78/0x8c
        [<ffffffff81047139>] ? warn_slowpath_fmt+0x45/0x4a
        [<ffffffff81144a99>] ? remove_proc_entry+0xd8/0x22e
        [<ffffffff810ebbaa>] ? kfree+0x5b/0x6c
        [<ffffffffa043c501>] ? hashlimit_net_exit+0x45/0x8d [xt_hashlimit]
        [<ffffffff8128ab30>] ? ops_exit_list+0x1c/0x44
        [<ffffffff8128b28e>] ? cleanup_net+0xf1/0x180
        [<ffffffff810369fc>] ? should_resched+0x5/0x23
        [<ffffffff8105b8f9>] ? process_one_work+0x161/0x269
        [<ffffffff8105aea5>] ? cwq_activate_delayed_work+0x3c/0x48
        [<ffffffff8105c8c2>] ? worker_thread+0xc2/0x145
        [<ffffffff8105c800>] ? manage_workers.isra.25+0x15b/0x15b
        [<ffffffff8105fa01>] ? kthread+0x76/0x7e
        [<ffffffff813581f4>] ? kernel_thread_helper+0x4/0x10
        [<ffffffff8105f98b>] ? kthread_worker_fn+0x139/0x139
        [<ffffffff813581f0>] ? gs_change+0x13/0x13
       ---[ end trace d8c3cc0ad163ef79 ]---
       ------------[ cut here ]------------
       WARNING: at /usr/src/linux-3.2.52/debian/build/source_netctl/fs/proc/generic.c:849
       remove_proc_entry+0x217/0x22e()
       Hardware name:
       remove_proc_entry: removing non-empty directory 'net/ip6t_hashlimit', leaking at least 'IN-REJECT'
      
      This is due to lack of removal net/ip6t_hashlimit/* entries in
      hashlimit_proc_net_exit(), since only IPv4 entries are deleted. Fix
      it by always removing the IPv4 and IPv6 entries and their parent
      directories in the netns destroy path.
      Signed-off-by: default avatarSergey Popovich <popovich_sergei@mail.ru>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      b4ef4ce0
  4. 06 Dec, 2013 24 commits
    • Robert Stonehouse's avatar
      sfc: Poll for MCDI completion once before timeout occurs · 6b294b8e
      Robert Stonehouse authored
      There is an as-yet unexplained bug that sometimes prevents (or delays)
      the driver seeing the completion event for a completed MCDI request on
      the SFC9120.  The requested configuration change will have happened
      but the driver assumes it to have failed, and this can result in
      further failures.  We can mitigate this by polling for completion
      after unsuccessfully waiting for an event.
      
      Fixes: 8127d661 ('sfc: Add support for Solarflare SFC9100 family')
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      6b294b8e
    • Robert Stonehouse's avatar
    • Andrew Rybchenko's avatar
      sfc: RX buffer allocation takes prefix size into account in IP header alignment · 2ec03014
      Andrew Rybchenko authored
      rx_prefix_size is 4-bytes aligned on Falcon/Siena (16 bytes), but it is equal
      to 14 on EF10. So, it should be taken into account if arch requires IP header
      to be 4-bytes aligned (via NET_IP_ALIGN).
      
      Fixes: 8127d661 ('sfc: Add support for Solarflare SFC9100 family')
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      2ec03014
    • Ben Hutchings's avatar
      sfc: Maintain current frequency adjustment when applying a time offset · cd6fe65e
      Ben Hutchings authored
      There is a single MCDI PTP operation for setting the frequency
      adjustment and applying a time offset to the hardware clock.  When
      applying a time offset we should not change the frequency adjustment.
      
      These two operations can now be requested separately but this requires
      a flash firmware update.  Keep using the single operation, but
      remember and repeat the previous frequency adjustment.
      
      Fixes: 7c236c43 ('sfc: Add support for IEEE-1588 PTP')
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      cd6fe65e
    • Alexandre Rames's avatar
      sfc: Stop/re-start PTP when stopping/starting the datapath. · 2ea4dc28
      Alexandre Rames authored
      This disables PTP when we bring the interface down to avoid getting
      unmatched RX timestamp events, and tries to re-enable it when bringing
      the interface up.
      
      [bwh: Make efx_ptp_stop() safe on Falcon. Introduce
       efx_ptp_{start,stop}_datapath() functions; we'll expand them later.]
      
      Fixes: 7c236c43 ('sfc: Add support for IEEE-1588 PTP')
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      2ea4dc28
    • Ben Hutchings's avatar
      sfc: Rate-limit log message for PTP packets without a matching timestamp event · 35f9a7a3
      Ben Hutchings authored
      In case of a flood of PTP packets, the timestamp peripheral and MC
      firmware on the SFN[56]322F boards may not be able to provide
      timestamp events for all packets.  Don't complain too much about this.
      
      Fixes: 7c236c43 ('sfc: Add support for IEEE-1588 PTP')
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      35f9a7a3
    • Laurence Evans's avatar
      sfc: PTP: Moderate log message on event queue overflow · f3211600
      Laurence Evans authored
      Limit syslog flood if a PTP packet storm occurs.
      
      Fixes: 7c236c43 ('sfc: Add support for IEEE-1588 PTP')
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      f3211600
    • Michael Dalton's avatar
      virtio-net: free bufs correctly on invalid packet length · 98bfd23c
      Michael Dalton authored
      When a packet with invalid length arrives, ensure that the packet
      is freed correctly if mergeable packet buffers and big packets
      (GUEST_TSO4) are both enabled.
      Signed-off-by: default avatarMichael Dalton <mwdalton@google.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Acked-by: default avatarAndrew Vagin <avagin@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      98bfd23c
    • Ezequiel Garcia's avatar
      net: mvneta: Fix incorrect DMA unmapping size · a328f3a0
      Ezequiel Garcia authored
      The current code unmaps the DMA mapping created for rx skb_buff's by
      using the data_size as the the mapping size. This is wrong since the
      correct size to specify should match the size used to create the mapping.
      
      This commit removes the following DMA_API_DEBUG warning:
      
      ------------[ cut here ]------------
      WARNING: at lib/dma-debug.c:887 check_unmap+0x3a8/0x860()
      mvneta d0070000.ethernet: DMA-API: device driver frees DMA memory with different size [device address=0x000000002eb80000] [map size=1600 bytes] [unmap size=66 bytes]
      CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.21-01444-ga88ae13-dirty #92
      [<c0013600>] (unwind_backtrace+0x0/0xf8) from [<c0010fb8>] (show_stack+0x10/0x14)
      [<c0010fb8>] (show_stack+0x10/0x14) from [<c001afa0>] (warn_slowpath_common+0x48/0x68)
      [<c001afa0>] (warn_slowpath_common+0x48/0x68) from [<c001b01c>] (warn_slowpath_fmt+0x30/0x40)
      [<c001b01c>] (warn_slowpath_fmt+0x30/0x40) from [<c018d0fc>] (check_unmap+0x3a8/0x860)
      [<c018d0fc>] (check_unmap+0x3a8/0x860) from [<c018d734>] (debug_dma_unmap_page+0x64/0x70)
      [<c018d734>] (debug_dma_unmap_page+0x64/0x70) from [<c0233f78>] (mvneta_rx+0xec/0x468)
      [<c0233f78>] (mvneta_rx+0xec/0x468) from [<c023436c>] (mvneta_poll+0x78/0x16c)
      [<c023436c>] (mvneta_poll+0x78/0x16c) from [<c02db468>] (net_rx_action+0x94/0x160)
      [<c02db468>] (net_rx_action+0x94/0x160) from [<c0021e68>] (__do_softirq+0xe8/0x1d0)
      [<c0021e68>] (__do_softirq+0xe8/0x1d0) from [<c0021ff8>] (do_softirq+0x4c/0x58)
      [<c0021ff8>] (do_softirq+0x4c/0x58) from [<c0022228>] (irq_exit+0x58/0x90)
      [<c0022228>] (irq_exit+0x58/0x90) from [<c000e7c8>] (handle_IRQ+0x3c/0x94)
      [<c000e7c8>] (handle_IRQ+0x3c/0x94) from [<c0008548>] (armada_370_xp_handle_irq+0x4c/0xb4)
      [<c0008548>] (armada_370_xp_handle_irq+0x4c/0xb4) from [<c000dc20>] (__irq_svc+0x40/0x50)
      Exception stack(0xc04f1f70 to 0xc04f1fb8)
      1f60:                                     c1fe46f8 00000000 00001d92 00001d92
      1f80: c04f0000 c04f0000 c04f84a4 c03e081c c05220e7 00000001 c05220e7 c04f0000
      1fa0: 00000000 c04f1fb8 c000eaf8 c004c048 60000113 ffffffff
      [<c000dc20>] (__irq_svc+0x40/0x50) from [<c004c048>] (cpu_startup_entry+0x54/0x128)
      [<c004c048>] (cpu_startup_entry+0x54/0x128) from [<c04c1a14>] (start_kernel+0x29c/0x2f0)
      [<c04c1a14>] (start_kernel+0x29c/0x2f0) from [<00008074>] (0x8074)
      ---[ end trace d4955f6acd178110 ]---
      Mapped at:
       [<c018d600>] debug_dma_map_page+0x4c/0x11c
       [<c0235d6c>] mvneta_setup_rxqs+0x398/0x598
       [<c0236084>] mvneta_open+0x40/0x17c
       [<c02dbbd4>] __dev_open+0x9c/0x100
       [<c02dbe58>] __dev_change_flags+0x7c/0x134
      Signed-off-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a328f3a0
    • Jiri Pirko's avatar
      br: fix use of ->rx_handler_data in code executed on non-rx_handler path · 859828c0
      Jiri Pirko authored
      br_stp_rcv() is reached by non-rx_handler path. That means there is no
      guarantee that dev is bridge port and therefore simple NULL check of
      ->rx_handler_data is not enough. There is need to check if dev is really
      bridge port and since only rcu read lock is held here, do it by checking
      ->rx_handler pointer.
      
      Note that synchronize_net() in netdev_rx_handler_unregister() ensures
      this approach as valid.
      
      Introduced originally by:
      commit f350a0a8
        "bridge: use rx_handler_data pointer to store net_bridge_port pointer"
      
      Fixed but not in the best way by:
      commit b5ed54e9
        "bridge: fix RCU races with bridge port"
      
      Reintroduced by:
      commit 716ec052
        "bridge: fix NULL pointer deref of br_port_get_rcu"
      
      Please apply to stable trees as well. Thanks.
      
      RH bugzilla reference: https://bugzilla.redhat.com/show_bug.cgi?id=1025770Reported-by: default avatarLaine Stump <laine@redhat.com>
      Debugged-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      859828c0
    • Ben Hutchings's avatar
      sfc: Add length checks to efx_xmit_with_hwtstamp() and efx_ptp_is_ptp_tx() · e5a498e9
      Ben Hutchings authored
      efx_ptp_is_ptp_tx() must be robust against skbs from raw sockets that
      have invalid IPv4 and UDP headers.
      
      Add checks that:
      - the transport header has been found
      - there is enough space between network and transport header offset
        for an IPv4 header
      - there is enough space after the transport header offset for a
        UDP header
      
      Fixes: 7c236c43 ('sfc: Add support for IEEE-1588 PTP')
      Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
      e5a498e9
    • Andrey Vagin's avatar
      virtio: delete napi structures from netdev before releasing memory · d4fb84ee
      Andrey Vagin authored
      free_netdev calls netif_napi_del too, but it's too late, because napi
      structures are placed on vi->rq. netif_napi_add() is called from
      virtnet_alloc_queues.
      
      general protection fault: 0000 [#1] SMP
      Dumping ftrace buffer:
         (ftrace buffer empty)
      Modules linked in: ip6table_filter ip6_tables iptable_filter ip_tables virtio_balloon pcspkr virtio_net(-) i2c_pii
      CPU: 1 PID: 347 Comm: rmmod Not tainted 3.13.0-rc2+ #171
      Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      task: ffff8800b779c420 ti: ffff8800379e0000 task.ti: ffff8800379e0000
      RIP: 0010:[<ffffffff81322e19>]  [<ffffffff81322e19>] __list_del_entry+0x29/0xd0
      RSP: 0018:ffff8800379e1dd0  EFLAGS: 00010a83
      RAX: 6b6b6b6b6b6b6b6b RBX: ffff8800379c2fd0 RCX: dead000000200200
      RDX: 6b6b6b6b6b6b6b6b RSI: 0000000000000001 RDI: ffff8800379c2fd0
      RBP: ffff8800379e1dd0 R08: 0000000000000001 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000001 R12: ffff8800379c2f90
      R13: ffff880037839160 R14: 0000000000000000 R15: 00000000013352f0
      FS:  00007f1400e34740(0000) GS:ffff8800bfb00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 00007f464124c763 CR3: 00000000b68cf000 CR4: 00000000000006e0
      Stack:
       ffff8800379e1df0 ffffffff8155beab 6b6b6b6b6b6b6b2b ffff8800378391c0
       ffff8800379e1e18 ffffffff8156499b ffff880037839be0 ffff880037839d20
       ffff88003779d3f0 ffff8800379e1e38 ffffffffa003477c ffff88003779d388
      Call Trace:
       [<ffffffff8155beab>] netif_napi_del+0x1b/0x80
       [<ffffffff8156499b>] free_netdev+0x8b/0x110
       [<ffffffffa003477c>] virtnet_remove+0x7c/0x90 [virtio_net]
       [<ffffffff813ae323>] virtio_dev_remove+0x23/0x80
       [<ffffffff813f62ef>] __device_release_driver+0x7f/0xf0
       [<ffffffff813f6ca0>] driver_detach+0xc0/0xd0
       [<ffffffff813f5f28>] bus_remove_driver+0x58/0xd0
       [<ffffffff813f72ec>] driver_unregister+0x2c/0x50
       [<ffffffff813ae65e>] unregister_virtio_driver+0xe/0x10
       [<ffffffffa0036942>] virtio_net_driver_exit+0x10/0x6ce [virtio_net]
       [<ffffffff810d7cf2>] SyS_delete_module+0x172/0x220
       [<ffffffff810a732d>] ? trace_hardirqs_on+0xd/0x10
       [<ffffffff810f5d4c>] ? __audit_syscall_entry+0x9c/0xf0
       [<ffffffff81677f69>] system_call_fastpath+0x16/0x1b
      Code: 00 00 55 48 8b 17 48 b9 00 01 10 00 00 00 ad de 48 8b 47 08 48 89 e5 48 39 ca 74 29 48 b9 00 02 20 00 00 00
      RIP  [<ffffffff81322e19>] __list_del_entry+0x29/0xd0
       RSP <ffff8800379e1dd0>
      ---[ end trace d5931cd3f87c9763 ]---
      
      Fixes: 986a4f4d (virtio_net: multiqueue support)
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4fb84ee
    • Andrey Vagin's avatar
      virtio-net: determine type of bufs correctly · fa9fac17
      Andrey Vagin authored
      free_unused_bufs must check vi->mergeable_rx_bufs before
      vi->big_packets, because we use this sequence in other places.
      Otherwise we allocate buffer of one type, then free it as another
      type.
      
      general protection fault: 0000 [#1] SMP
      Dumping ftrace buffer:
         (ftrace buffer empty)
      Modules linked in: ip6table_filter ip6_tables iptable_filter ip_tables pcspkr virtio_balloon virtio_net(-) i2c_pii
      CPU: 0 PID: 400 Comm: rmmod Not tainted 3.13.0-rc2+ #170
      Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      task: ffff8800b6d2a210 ti: ffff8800aed32000 task.ti: ffff8800aed32000
      RIP: 0010:[<ffffffffa00345f3>]  [<ffffffffa00345f3>] free_unused_bufs+0xc3/0x190 [virtio_net]
      RSP: 0018:ffff8800aed33dd8  EFLAGS: 00010202
      RAX: ffff8800b1fe2c00 RBX: ffff8800b66a7240 RCX: 6b6b6b6b6b6b6b6b
      RDX: 6b6b6b6b6b6b6b6b RSI: ffff8800b8419a68 RDI: ffff8800b66a1148
      RBP: ffff8800aed33e00 R08: 0000000000000001 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
      R13: ffff8800b66a1148 R14: 0000000000000000 R15: 000077ff80000000
      FS:  00007fc4f9c4e740(0000) GS:ffff8800bfa00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 00007f63f432f000 CR3: 00000000b6538000 CR4: 00000000000006f0
      Stack:
       ffff8800b66a7240 ffff8800b66a7380 ffff8800377bd3f0 0000000000000000
       00000000023302f0 ffff8800aed33e18 ffffffffa00346e2 ffff8800b66a7240
       ffff8800aed33e38 ffffffffa003474d ffff8800377bd388 ffff8800377bd390
      Call Trace:
       [<ffffffffa00346e2>] remove_vq_common+0x22/0x40 [virtio_net]
       [<ffffffffa003474d>] virtnet_remove+0x4d/0x90 [virtio_net]
       [<ffffffff813ae303>] virtio_dev_remove+0x23/0x80
       [<ffffffff813f62cf>] __device_release_driver+0x7f/0xf0
       [<ffffffff813f6c80>] driver_detach+0xc0/0xd0
       [<ffffffff813f5f08>] bus_remove_driver+0x58/0xd0
       [<ffffffff813f72cc>] driver_unregister+0x2c/0x50
       [<ffffffff813ae63e>] unregister_virtio_driver+0xe/0x10
       [<ffffffffa0036852>] virtio_net_driver_exit+0x10/0x7be [virtio_net]
       [<ffffffff810d7cf2>] SyS_delete_module+0x172/0x220
       [<ffffffff810a732d>] ? trace_hardirqs_on+0xd/0x10
       [<ffffffff810f5d4c>] ? __audit_syscall_entry+0x9c/0xf0
       [<ffffffff81677f69>] system_call_fastpath+0x16/0x1b
      Code: c0 74 55 0f 1f 44 00 00 80 7b 30 00 74 7a 48 8b 50 30 4c 89 e6 48 03 73 20 48 85 d2 0f 84 bb 00 00 00 66 0f
      RIP  [<ffffffffa00345f3>] free_unused_bufs+0xc3/0x190 [virtio_net]
       RSP <ffff8800aed33dd8>
      ---[ end trace edb570ea923cce9c ]---
      
      Fixes: 2613af0e (virtio_net: migrate mergeable rx buffers to page frag allocators)
      Cc: Michael Dalton <mwdalton@google.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Signed-off-by: default avatarAndrey Vagin <avagin@openvz.org>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Acked-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa9fac17
    • Nikolay Aleksandrov's avatar
      bonding: fix packets_per_slave showing · a752a8b9
      Nikolay Aleksandrov authored
      There's an issue when showing the value of packets_per_slave due to
      using signed integer. The value may be < 0 and thus not put through
      reciprocal_value() before showing. This patch makes it use unsigned
      integer when showing it.
      
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: Jay Vosburgh <fubar@us.ibm.com>
      CC: Veaceslav Falico <vfalico@redhat.com>
      CC: David S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarNikolay Aleksandrov <nikolay@redhat.com>
      Acked-by: default avatarVeaceslav Falico <vfalico@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a752a8b9
    • Somnath Kotur's avatar
      be2net: Free/delete pmacs (in be_clear()) only if they exist · b05004ad
      Somnath Kotur authored
      During suspend-resume and lancer error recovery we will cleanup and
      re-initialize the resources through be_clear() and be_setup() respectively.
      During re-initialisation in be_setup(), if be_get_config() fails, we'll again
      call be_clear() which will cause a NULL pointer dereference as adapter->pmac_id is
      already freed.
      Signed-off-by: default avatarKalesh AP <kalesh.purayil@emulex.com>
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b05004ad
    • Somnath Kotur's avatar
      be2net: Fix Lancer error recovery to distinguish FW download · 4bebb56a
      Somnath Kotur authored
      The Firmware update would be detected by looking at the sliport_error1/
      sliport_error2 register values(0x02/0x00). If its not a FW reset the current
      messaging would take place. If the error is due to FW reset, log a message to
      user that "Firmware update in progress" and also do not log sliport_status and
      sliport_error register values.
      Signed-off-by: default avatarKalesh AP <kalesh.purayil@emulex.com>
      Signed-off-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4bebb56a
    • Zhi Yong Wu's avatar
      d0b7da8a
    • Zhi Yong Wu's avatar
      e6ebc7f1
    • Hannes Frederic Sowa's avatar
      net: clear local_df when passing skb between namespaces · 239c78db
      Hannes Frederic Sowa authored
      We must clear local_df when passing the skb between namespaces as the
      packet is not local to the new namespace any more and thus may not get
      fragmented by local rules. Fred Templin noticed that other namespaces
      do fragment IPv6 packets while forwarding. Instead they should have send
      back a PTB.
      
      The same problem should be present when forwarding DF-IPv4 packets
      between namespaces.
      Reported-by: default avatarTemplin, Fred L <Fred.L.Templin@boeing.com>
      Signed-off-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      239c78db
    • Eric W. Biederman's avatar
      tcp_memcontrol: Cleanup/fix cg_proto->memory_pressure handling. · 7f2cbdc2
      Eric W. Biederman authored
      kill memcg_tcp_enter_memory_pressure.  The only function of
      memcg_tcp_enter_memory_pressure was to reduce deal with the
      unnecessary abstraction that was tcp_memcontrol.  Now that struct
      tcp_memcontrol is gone remove this unnecessary function, the
      unnecessary function pointer, and modify sk_enter_memory_pressure to
      set this field directly, just as sk_leave_memory_pressure cleas this
      field directly.
      
      This fixes a small bug I intruduced when killing struct tcp_memcontrol
      that caused memcg_tcp_enter_memory_pressure to never be called and
      thus failed to ever set cg_proto->memory_pressure.
      
      Remove the cg_proto enter_memory_pressure function as it now serves
      no useful purpose.
      
      Don't test cg_proto->memory_presser in sk_leave_memory_pressure before
      clearing it.  The test was originally there to ensure that the pointer
      was non-NULL.  Now that cg_proto is not a pointer the pointer does not
      matter.
      Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7f2cbdc2
    • Ivan Vecera's avatar
      forcedeth: run loopback test only on chipsets that support it · 86d9be26
      Ivan Vecera authored
      The driver incorrectly run loopback test on chips that don't support it.
      Loopback test is only supported by chips that has DEV_HAS_TEST_EXTENDED
      flag and returns 4 (NV_TEST_COUNT_EXTENDED) as test count.
      Signed-off-by: default avatarIvan Vecera <ivecera@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      86d9be26
    • dingtianhong's avatar
      bonding: add arp_ip_target checks when install the module · 89015c18
      dingtianhong authored
      When I install the bonding with the wrong arp_ip_target,
      just like arp_ip_target=500.500.500.500, the arp_ip_target
      was transfored to 245.245.245.244 and stored in the ip
      target success, it is uncorrect, so I add checks to avoid
      adding wrong address.
      
      The in4_pton() will set wrong ip address to 0.0.0.0 and
      return 0, also use the micro IS_IP_TARGET_UNUSABLE_ADDRESS
      to simplify the code.
      Signed-off-by: default avatarDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      89015c18
    • Michal Kalderon's avatar
      bnx2x: avoid null pointer dereference when enabling SR-IOV · c8781cf4
      Michal Kalderon authored
      Fixed NULL pointer dereference when dynamically activating SR-IOV after vf
      database failed to be allocated in probe stage (for example due to no ARI
      support in pci hub).
      Signed-off-by: default avatarMichal Kalderon <michals@broadcom.com>
      Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c8781cf4
    • wangweidong's avatar
      sctp: disable max_burst when the max_burst is 0 · 78ac814f
      wangweidong authored
      As Michael pointed out that when max_burst is 0, it just disable
      max_burst. It declared in rfc6458#section-8.1.24. so add the check
      in sctp_transport_burst_limited, when it 0, just do nothing.
      Reviewed-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Suggested-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Suggested-by: default avatarMichael Tuexen <Michael.Tuexen@lurchi.franken.de>
      Signed-off-by: default avatarWang Weidong <wangweidong1@huawei.com>
      Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      78ac814f