1. 29 8月, 2017 13 次提交
  2. 26 8月, 2017 8 次提交
  3. 25 8月, 2017 14 次提交
  4. 24 8月, 2017 5 次提交
    • A
      netfilter: nf_tables: Fix nft limit burst handling · c26844ed
      andy zhou 提交于
      Current implementation treats the burst configuration the same as
      rate configuration. This can cause the per packet cost to be lower
      than configured. In effect, this bug causes the token bucket to be
      refilled at a higher rate than what user has specified.
      
      This patch changes the implementation so that the token bucket size
      is controlled by "rate + burst", while maintain the token bucket
      refill rate the same as user specified.
      
      Fixes: 96518518 ("netfilter: add nftables")
      Signed-off-by: NAndy Zhou <azhou@ovn.org>
      Acked-by: NJoe Stringer <joe@ovn.org>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      c26844ed
    • X
      netfilter: check for seqadj ext existence before adding it in nf_nat_setup_info · ab6dd1be
      Xin Long 提交于
      Commit 4440a2ab ("netfilter: synproxy: Check oom when adding synproxy
      and seqadj ct extensions") wanted to drop the packet when it fails to add
      seqadj ext due to no memory by checking if nfct_seqadj_ext_add returns
      NULL.
      
      But that nfct_seqadj_ext_add returns NULL can also happen when seqadj ext
      already exists in a nf_conn. It will cause that userspace protocol doesn't
      work when both dnat and snat are configured.
      
      Li Shuang found this issue in the case:
      
      Topo:
         ftp client                   router                  ftp server
        10.167.131.2  <-> 10.167.131.254  10.167.141.254 <-> 10.167.141.1
      
      Rules:
        # iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 21 -j \
          DNAT --to-destination 10.167.141.1
        # iptables -t nat -A POSTROUTING -o eth2 -p tcp -m tcp --dport 21 -j \
          SNAT --to-source 10.167.141.254
      
      In router, when both dnat and snat are added, nf_nat_setup_info will be
      called twice. The packet can be dropped at the 2nd time for DNAT due to
      seqadj ext is already added at the 1st time for SNAT.
      
      This patch is to fix it by checking for seqadj ext existence before adding
      it, so that the packet will not be dropped if seqadj ext already exists.
      
      Note that as Florian mentioned, as a long term, we should review ext_add()
      behaviour, it's better to return a pointer to the existing ext instead.
      
      Fixes: 4440a2ab ("netfilter: synproxy: Check oom when adding synproxy and seqadj ct extensions")
      Reported-by: NLi Shuang <shuali@redhat.com>
      Acked-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      ab6dd1be
    • L
      iwlwifi: pcie: move rx workqueue initialization to iwl_trans_pcie_alloc() · 10a54d81
      Luca Coelho 提交于
      Work queues cannot be allocated when a mutex is held because the mutex
      may be in use and that would make it sleep.  Doing so generates the
      following splat with 4.13+:
      
      [   19.513298] ======================================================
      [   19.513429] WARNING: possible circular locking dependency detected
      [   19.513557] 4.13.0-rc5+ #6 Not tainted
      [   19.513638] ------------------------------------------------------
      [   19.513767] cpuhp/0/12 is trying to acquire lock:
      [   19.513867]  (&tz->lock){+.+.+.}, at: [<ffffffff924afebb>] thermal_zone_get_temp+0x5b/0xb0
      [   19.514047]
      [   19.514047] but task is already holding lock:
      [   19.514166]  (cpuhp_state){+.+.+.}, at: [<ffffffff91cc4baa>] cpuhp_thread_fun+0x3a/0x210
      [   19.514338]
      [   19.514338] which lock already depends on the new lock.
      
      This lock dependency already existed with previous kernel versions,
      but it was not detected until commit 49dfe2a6 ("cpuhotplug: Link
      lock stacks for hotplug callbacks") was introduced.
      Reported-by: NDavid Weinehall <david.weinehall@intel.com>
      Reported-by: NJiri Kosina <jikos@kernel.org>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      10a54d81
    • D
      Merge branch 'bnxt_en-bug-fixes' · d0273ef3
      David S. Miller 提交于
      Michael Chan says:
      
      ====================
      bnxt_en: bug fixes.
      
      3 bug fixes related to XDP ring accounting in bnxt_setup_tc(), freeing
      MSIX vectors when bnxt_re unregisters, and preserving the user-administered
      PF MAC address when disabling SRIOV.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d0273ef3
    • M
      bnxt_en: Do not setup MAC address in bnxt_hwrm_func_qcaps(). · a22a6ac2
      Michael Chan 提交于
      bnxt_hwrm_func_qcaps() is called during probe to get all device
      resources and it also sets up the factory MAC address.  The same function
      is called when SRIOV is disabled to reclaim all resources.  If
      the MAC address has been overridden by a user administered MAC
      address, calling this function will overwrite it.
      
      Separate the logic that sets up the default MAC address into a new
      function bnxt_init_mac_addr() that is only called during probe time.
      
      Fixes: 4a21b49b ("bnxt_en: Improve VF resource accounting.")
      Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a22a6ac2