1. 04 9月, 2017 3 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · b63f6044
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for your net-next
      tree. Basically, updates to the conntrack core, enhancements for
      nf_tables, conversion of netfilter hooks from linked list to array to
      improve memory locality and asorted improvements for the Netfilter
      codebase. More specifically, they are:
      
      1) Add expection to hashes after timer initialization to prevent
         access from another CPU that walks on the hashes and calls
         del_timer(), from Florian Westphal.
      
      2) Don't update nf_tables chain counters from hot path, this is only
         used by the x_tables compatibility layer.
      
      3) Get rid of nested rcu_read_lock() calls from netfilter hook path.
         Hooks are always guaranteed to run from rcu read side, so remove
         nested rcu_read_lock() where possible. Patch from Taehee Yoo.
      
      4) nf_tables new ruleset generation notifications include PID and name
         of the process that has updated the ruleset, from Phil Sutter.
      
      5) Use skb_header_pointer() from nft_fib, so we can reuse this code from
         the nf_family netdev family. Patch from Pablo M. Bermudo.
      
      6) Add support for nft_fib in nf_tables netdev family, also from Pablo.
      
      7) Use deferrable workqueue for conntrack garbage collection, to reduce
         power consumption, from Patch from Subash Abhinov Kasiviswanathan.
      
      8) Add nf_ct_expect_iterate_net() helper and use it. From Florian
         Westphal.
      
      9) Call nf_ct_unconfirmed_destroy only from cttimeout, from Florian.
      
      10) Drop references on conntrack removal path when skbuffs has escaped via
          nfqueue, from Florian.
      
      11) Don't queue packets to nfqueue with dying conntrack, from Florian.
      
      12) Constify nf_hook_ops structure, from Florian.
      
      13) Remove neededlessly branch in nf_tables trace code, from Phil Sutter.
      
      14) Add nla_strdup(), from Phil Sutter.
      
      15) Rise nf_tables objects name size up to 255 chars, people want to use
          DNS names, so increase this according to what RFC 1035 specifies.
          Patch series from Phil Sutter.
      
      16) Kill nf_conntrack_default_on, it's broken. Default on conntrack hook
          registration on demand, suggested by Eric Dumazet, patch from Florian.
      
      17) Remove unused variables in compat_copy_entry_from_user both in
          ip_tables and arp_tables code. Patch from Taehee Yoo.
      
      18) Constify struct nf_conntrack_l4proto, from Julia Lawall.
      
      19) Constify nf_loginfo structure, also from Julia.
      
      20) Use a single rb root in connlimit, from Taehee Yoo.
      
      21) Remove unused netfilter_queue_init() prototype, from Taehee Yoo.
      
      22) Use audit_log() instead of open-coding it, from Geliang Tang.
      
      23) Allow to mangle tcp options via nft_exthdr, from Florian.
      
      24) Allow to fetch TCP MSS from nft_rt, from Florian. This includes
          a fix for a miscalculation of the minimal length.
      
      25) Simplify branch logic in h323 helper, from Nick Desaulniers.
      
      26) Calculate netlink attribute size for conntrack tuple at compile
          time, from Florian.
      
      27) Remove protocol name field from nf_conntrack_{l3,l4}proto structure.
          From Florian.
      
      28) Remove holes in nf_conntrack_l4proto structure, so it becomes
          smaller. From Florian.
      
      29) Get rid of print_tuple() indirection for /proc conntrack listing.
          Place all the code in net/netfilter/nf_conntrack_standalone.c.
          Patch from Florian.
      
      30) Do not built in print_conntrack() if CONFIG_NF_CONNTRACK_PROCFS is
          off. From Florian.
      
      31) Constify most nf_conntrack_{l3,l4}proto helper functions, from
          Florian.
      
      32) Fix broken indentation in ebtables extensions, from Colin Ian King.
      
      33) Fix several harmless sparse warning, from Florian.
      
      34) Convert netfilter hook infrastructure to use array for better memory
          locality, joint work done by Florian and Aaron Conole. Moreover, add
          some instrumentation to debug this.
      
      35) Batch nf_unregister_net_hooks() calls, to call synchronize_net once
          per batch, from Florian.
      
      36) Get rid of noisy logging in ICMPv6 conntrack helper, from Florian.
      
      37) Get rid of obsolete NFDEBUG() instrumentation, from Varsha Rao.
      
      38) Remove unused code in the generic protocol tracker, from Davide
          Caratti.
      
      I think I will have material for a second Netfilter batch in my queue if
      time allow to make it fit in this merge window.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b63f6044
    • C
      net/mlx4_core: fix incorrect size allocation for dev->caps.spec_qps · 942e7e5f
      Colin Ian King 提交于
      The current allocation for dev->caps.spec_qps is for the size of the
      pointer and not the size of the actual  mlx4_spec_qps structure.  Fix
      this by using the correct size.   Also splint allocation over a few
      lines to make it cppcheck clean on overly wide lines.
      
      Detected by CoverityScan, CID#1455222 ("Wrong sizeof argument")
      
      Fixes: c73c8b1e ("net/mlx4_core: Dynamically allocate structs at mlx4_slave_cap")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Acked-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      942e7e5f
    • C
      net/mlx4_core: fix memory leaks on error exit path · 542deb88
      Colin Ian King 提交于
      The structures hca_param and func_cap are not being kfree'd on an error
      exit path causing two memory leaks. Fix this by jumping to the existing
      free memory error exit path.
      
      Detected by CoverityScan, CID#1455219, CID#1455224 ("Resource Leak")
      
      Fixes: c73c8b1e ("net/mlx4_core: Dynamically allocate structs at mlx4_slave_cap")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Acked-by: NTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      542deb88
  2. 02 9月, 2017 37 次提交