1. 04 Jun, 2018 17 commits
  2. 03 Jun, 2018 12 commits
    • David S. Miller's avatar
      Merge tag 'wireless-drivers-next-for-davem-2018-05-31' of... · f624434a
      David S. Miller authored
      Merge tag 'wireless-drivers-next-for-davem-2018-05-31' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
      
      Kalle Valo says:
      
      ====================
      wireless-drivers-next patches for 4.18
      
      Hopefully the last pull request to 4.18 before the merge window.
      Nothing major here, we have smaller new features and of course a lots
      of fixes.
      
      Major changes:
      
      ath10k
      
      * add memory dump support for QCA9888 and QCA99X0
      
      * add support to configure channel dwell time
      
      * support new DFS host confirmation feature in the firmware
      
      ath
      
      * update various regulatory mappings
      
      wcn36xx
      
      * various fixes to improve reliability
      
      * add Factory Test Mode support
      
      brmfmac
      
      * add debugfs file for reading firmware capabilities
      
      mwifiex
      
      * support sysfs initiated device coredump
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f624434a
    • Thadeu Lima de Souza Cascardo's avatar
    • YueHaibing's avatar
      net: axienet: remove stale comment of axienet_open · deba328c
      YueHaibing authored
      axienet_open no longer return -ENODEV when PHY cannot be connected to
      since commit d7cc3163 ("net: axienet: Support phy-less mode of operation")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      deba328c
    • Samuel Mendoza-Jonas's avatar
      net/ncsi: Avoid GFP_KERNEL in response handler · b0949618
      Samuel Mendoza-Jonas authored
      ncsi_rsp_handler_gc() allocates the filter arrays using GFP_KERNEL in
      softirq context, causing the below backtrace. This allocation is only a
      few dozen bytes during probing so allocate with GFP_ATOMIC instead.
      
      [   42.813372] BUG: sleeping function called from invalid context at mm/slab.h:416
      [   42.820900] in_atomic(): 1, irqs_disabled(): 0, pid: 213, name: kworker/0:1
      [   42.827893] INFO: lockdep is turned off.
      [   42.832023] CPU: 0 PID: 213 Comm: kworker/0:1 Tainted: G        W       4.13.16-01441-gad99b38 #65
      [   42.841007] Hardware name: Generic DT based system
      [   42.845966] Workqueue: events ncsi_dev_work
      [   42.850251] [<8010a494>] (unwind_backtrace) from [<80107510>] (show_stack+0x20/0x24)
      [   42.858046] [<80107510>] (show_stack) from [<80612770>] (dump_stack+0x20/0x28)
      [   42.865309] [<80612770>] (dump_stack) from [<80148248>] (___might_sleep+0x230/0x2b0)
      [   42.873241] [<80148248>] (___might_sleep) from [<80148334>] (__might_sleep+0x6c/0xac)
      [   42.881129] [<80148334>] (__might_sleep) from [<80240d6c>] (__kmalloc+0x210/0x2fc)
      [   42.888737] [<80240d6c>] (__kmalloc) from [<8060ad54>] (ncsi_rsp_handler_gc+0xd0/0x170)
      [   42.896770] [<8060ad54>] (ncsi_rsp_handler_gc) from [<8060b454>] (ncsi_rcv_rsp+0x16c/0x1d4)
      [   42.905314] [<8060b454>] (ncsi_rcv_rsp) from [<804d86c8>] (__netif_receive_skb_core+0x3c8/0xb50)
      [   42.914158] [<804d86c8>] (__netif_receive_skb_core) from [<804d96cc>] (__netif_receive_skb+0x20/0x7c)
      [   42.923420] [<804d96cc>] (__netif_receive_skb) from [<804de4b0>] (netif_receive_skb_internal+0x78/0x6a4)
      [   42.932931] [<804de4b0>] (netif_receive_skb_internal) from [<804df980>] (netif_receive_skb+0x78/0x158)
      [   42.942292] [<804df980>] (netif_receive_skb) from [<8042f204>] (ftgmac100_poll+0x43c/0x4e8)
      [   42.950855] [<8042f204>] (ftgmac100_poll) from [<804e094c>] (net_rx_action+0x278/0x4c4)
      [   42.958918] [<804e094c>] (net_rx_action) from [<801016a8>] (__do_softirq+0xe0/0x4c4)
      [   42.966716] [<801016a8>] (__do_softirq) from [<8011cd9c>] (do_softirq.part.4+0x50/0x78)
      [   42.974756] [<8011cd9c>] (do_softirq.part.4) from [<8011cebc>] (__local_bh_enable_ip+0xf8/0x11c)
      [   42.983579] [<8011cebc>] (__local_bh_enable_ip) from [<804dde08>] (__dev_queue_xmit+0x260/0x890)
      [   42.992392] [<804dde08>] (__dev_queue_xmit) from [<804df1f0>] (dev_queue_xmit+0x1c/0x20)
      [   43.000689] [<804df1f0>] (dev_queue_xmit) from [<806099c0>] (ncsi_xmit_cmd+0x1c0/0x244)
      [   43.008763] [<806099c0>] (ncsi_xmit_cmd) from [<8060dc14>] (ncsi_dev_work+0x2e0/0x4c8)
      [   43.016725] [<8060dc14>] (ncsi_dev_work) from [<80133dfc>] (process_one_work+0x214/0x6f8)
      [   43.024940] [<80133dfc>] (process_one_work) from [<80134328>] (worker_thread+0x48/0x558)
      [   43.033070] [<80134328>] (worker_thread) from [<8013ba80>] (kthread+0x130/0x174)
      [   43.040506] [<8013ba80>] (kthread) from [<80102950>] (ret_from_fork+0x14/0x24)
      
      Fixes: 062b3e1b ("net/ncsi: Refactor MAC, VLAN filters")
      Signed-off-by: default avatarSamuel Mendoza-Jonas <sam@mendozajonas.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b0949618
    • YueHaibing's avatar
      net: netcp: ethss: remove unnecessary pointer set to NULL · a6ee84be
      YueHaibing authored
      If statement has make sure the 'slave->phy' is NULL
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6ee84be
    • Wei Yongjun's avatar
      net/smc: fix error return code in smc_setsockopt() · 3dc9f558
      Wei Yongjun authored
      Fix to return error code -EINVAL instead of 0 if optlen is invalid.
      
      Fixes: 01d2f7e2 ("net/smc: sockopts TCP_NODELAY and TCP_CORK")
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3dc9f558
    • Wei Yongjun's avatar
      net/mlx5: Make function mlx5_fpga_tls_send_teardown_cmd() static · 8cb77149
      Wei Yongjun authored
      Fixes the following sparse warning:
      
      drivers/net/ethernet/mellanox/mlx5/core/fpga/tls.c:199:6: warning:
       symbol 'mlx5_fpga_tls_send_teardown_cmd' was not declared. Should it be static?
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8cb77149
    • Wei Yongjun's avatar
      hv_netvsc: fix error return code in netvsc_probe() · 9c6ffbac
      Wei Yongjun authored
      Fix to return a negative error code from the failover register fail
      error handling case instead of 0, as done elsewhere in this function.
      
      Fixes: 1ff78076 ("netvsc: refactor notifier/event handling code to use the failover framework")
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c6ffbac
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 9c54aeb0
      David S. Miller authored
      Filling in the padding slot in the bpf structure as a bug fix in 'ne'
      overlapped with actually using that padding area for something in
      'net-next'.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9c54aeb0
    • Heiner Kallweit's avatar
      net: phy: consider PHY_IGNORE_INTERRUPT in state machine PHY_NOLINK handling · eaf47b17
      Heiner Kallweit authored
      We can bail out immediately also in case of PHY_IGNORE_INTERRUPT because
      phy_mac_interupt() informs us once the link is up.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eaf47b17
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 4cb160d0
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for your net-next tree:
      
      1) Get rid of nf_sk_is_transparent(), use inet_sk_transparent() instead.
         From Máté Eckl.
      
      2) Move shared tproxy infrastructure to nf_tproxy_ipv4 and nf_tproxy_ipv6.
         Also from Máté.
      
      3) Add hashtable to speed up chain lookups by name, from Florian Westphal.
      
      4) Patch series to add connlimit support reusing part of the
         nf_conncount infrastructure. This includes preparation changes such
         passing context to the object and expression destroy interface;
         garbage collection for expressions embedded into set elements, and
         the introduction of the clone_destroy interface for expressions.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4cb160d0
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 918fe1b3
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Infinite loop in _decode_session6(), from Eric Dumazet.
      
       2) Pass correct argument to nla_strlcpy() in netfilter, also from Eric
          Dumazet.
      
       3) Out of bounds memory access in ipv6 srh code, from Mathieu Xhonneux.
      
       4) NULL deref in XDP_REDIRECT handling of tun driver, from Toshiaki
          Makita.
      
       5) Incorrect idr release in cls_flower, from Paul Blakey.
      
       6) Probe error handling fix in davinci_emac, from Dan Carpenter.
      
       7) Memory leak in XPS configuration, from Alexander Duyck.
      
       8) Use after free with cloned sockets in kcm, from Kirill Tkhai.
      
       9) MTU handling fixes fo ip_tunnel and ip6_tunnel, from Nicolas
          Dichtel.
      
      10) Fix UAPI hole in bpf data structure for 32-bit compat applications,
          from Daniel Borkmann.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (33 commits)
        bpf: fix uapi hole for 32 bit compat applications
        net: usb: cdc_mbim: add flag FLAG_SEND_ZLP
        ip6_tunnel: remove magic mtu value 0xFFF8
        ip_tunnel: restore binding to ifaces with a large mtu
        net: dsa: b53: Add BCM5389 support
        kcm: Fix use-after-free caused by clonned sockets
        net-sysfs: Fix memory leak in XPS configuration
        ixgbe: fix parsing of TC actions for HW offload
        net: ethernet: davinci_emac: fix error handling in probe()
        net/ncsi: Fix array size in dumpit handler
        cls_flower: Fix incorrect idr release when failing to modify rule
        net/sonic: Use dma_mapping_error()
        xfrm Fix potential error pointer dereference in xfrm_bundle_create.
        vhost_net: flush batched heads before trying to busy polling
        tun: Fix NULL pointer dereference in XDP redirect
        be2net: Fix error detection logic for BE3
        net: qmi_wwan: Add Netgear Aircard 779S
        mlxsw: spectrum: Forbid creation of VLAN 1 over port/LAG
        atm: zatm: fix memcmp casting
        iwlwifi: pcie: compare with number of IRQs requested for, not number of CPUs
        ...
      918fe1b3
  3. 02 Jun, 2018 11 commits
    • Florian Westphal's avatar
      netfilter: nf_tables: handle chain name lookups via rhltable · 1b2470e5
      Florian Westphal authored
      If there is a significant amount of chains list search is too slow, so
      add an rhlist table for this.
      
      This speeds up ruleset loading: for every new rule we have to check if
      the name already exists in current generation.
      
      We need to be able to cope with duplicate chain names in case a transaction
      drops the nfnl mutex (for request_module) and the abort of this old
      transaction is still pending.
      
      The list is kept -- we need a way to iterate chains even if hash resize is
      in progress without missing an entry.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      1b2470e5
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: add connlimit support · 290180e2
      Pablo Neira Ayuso authored
      This features which allows you to limit the maximum number of
      connections per arbitrary key. The connlimit expression is stateful,
      therefore it can be used from meters to dynamically populate a set, this
      provides a mapping to the iptables' connlimit match. This patch also
      comes that allows you define static connlimit policies.
      
      This extension depends on the nf_conncount infrastructure.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      290180e2
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · e0255aec
      Linus Torvalds authored
      Pull SCSI fix from James Bottomley:
       "Eve of merge window fix: The original code was so bogus as to be
        casting the wrong generic device to an rport and proceeding to take
        actions based on the bogus values it found.
      
        Fortunately it seems the location that is dereferenced always exists,
        so the code hasn't oopsed yet, but it certainly annoys the memory
        checkers"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: scsi_transport_srp: Fix shost to rport translation
      e0255aec
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.17-rc8' of git://people.freedesktop.org/~airlied/linux · ada7339e
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "A few final fixes:
      
        i915:
         - fix for potential Spectre vector in the new query uAPI
         - fix NULL pointer deref (FDO #106559)
         - DMI fix to hide LVDS for Radiant P845 (FDO #105468)
      
        amdgpu:
         - suspend/resume DC regression fix
         - underscan flicker fix on fiji
         - gamma setting fix after dpms
      
        omap:
         - fix oops regression
      
        core:
         - fix PSR timing
      
        dw-hdmi:
         - fix oops regression"
      
      * tag 'drm-fixes-for-v4.17-rc8' of git://people.freedesktop.org/~airlied/linux:
        drm/amd/display: Update color props when modeset is required
        drm/amd/display: Make atomic-check validate underscan changes
        drm/bridge/synopsys: dw-hdmi: fix dw_hdmi_setup_rx_sense
        drm/amd/display: Fix BUG_ON during CRTC atomic check update
        drm/i915/query: nospec expects no more than an unsigned long
        drm/i915/query: Protect tainted function pointer lookup
        drm/i915/lvds: Move acpi lid notification registration to registration phase
        drm/i915: Disable LVDS on Radiant P845
        drm/omap: fix NULL deref crash with SDI displays
        drm/psr: Fix missed entry in PSR setup time table.
      ada7339e
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: add destroy_clone expression · 371ebcbb
      Pablo Neira Ayuso authored
      Before this patch, cloned expressions are released via ->destroy. This
      is a problem for the new connlimit expression since the ->destroy path
      drop a reference on the conntrack modules and it unregisters hooks. The
      new ->destroy_clone provides context that this expression is being
      released from the packet path, so it is mirroring ->clone(), where
      neither module reference is dropped nor hooks need to be unregistered -
      because this done from the control plane path from the ->init() path.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      371ebcbb
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: garbage collection for stateful expressions · 79b174ad
      Pablo Neira Ayuso authored
      Use garbage collector to schedule removal of elements based of feedback
      from expression that this element comes with. Therefore, the garbage
      collector is not guided by timeout expirations in this new mode.
      
      The new connlimit expression sets on the NFT_EXPR_GC flag to enable this
      behaviour, the dynset expression needs to explicitly enable the garbage
      collector via set->ops->gc_init call.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      79b174ad
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: pass ctx to nf_tables_expr_destroy() · 3453c927
      Pablo Neira Ayuso authored
      nft_set_elem_destroy() can be called from call_rcu context. Annotate
      netns and table in set object so we can populate the context object.
      Moreover, pass context object to nf_tables_set_elem_destroy() from the
      commit phase, since it is already available from there.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      3453c927
    • Pablo Neira Ayuso's avatar
      netfilter: nf_conncount: expose connection list interface · 5e5cbc7b
      Pablo Neira Ayuso authored
      This patch provides an interface to maintain the list of connections and
      the lookup function to obtain the number of connections in the list.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      5e5cbc7b
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: pass context to object destroy indirection · 00bfb320
      Pablo Neira Ayuso authored
      The new connlimit object needs this to properly deal with conntrack
      dependencies.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      00bfb320
    • Máté Eckl's avatar
      netfilter: Libify xt_TPROXY · 45ca4e0c
      Máté Eckl authored
      The extracted functions will likely be usefull to implement tproxy
      support in nf_tables.
      
      Extrancted functions:
      	- nf_tproxy_sk_is_transparent
      	- nf_tproxy_laddr4
      	- nf_tproxy_handle_time_wait4
      	- nf_tproxy_get_sock_v4
      	- nf_tproxy_laddr6
      	- nf_tproxy_handle_time_wait6
      	- nf_tproxy_get_sock_v6
      
      (nf_)tproxy_handle_time_wait6 also needed some refactor as its current
      implementation was xtables-specific.
      Signed-off-by: default avatarMáté Eckl <ecklm94@gmail.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      45ca4e0c
    • Máté Eckl's avatar
      netfilter: Decrease code duplication regarding transparent socket option · 8d6e5557
      Máté Eckl authored
      There is a function in include/net/netfilter/nf_socket.h to decide if a
      socket has IP(V6)_TRANSPARENT socket option set or not. However this
      does the same as inet_sk_transparent() in include/net/tcp.h
      
      include/net/tcp.h:1733
      /* This helper checks if socket has IP_TRANSPARENT set */
      static inline bool inet_sk_transparent(const struct sock *sk)
      {
      	switch (sk->sk_state) {
      	case TCP_TIME_WAIT:
      		return inet_twsk(sk)->tw_transparent;
      	case TCP_NEW_SYN_RECV:
      		return inet_rsk(inet_reqsk(sk))->no_srccheck;
      	}
      	return inet_sk(sk)->transparent;
      }
      
      tproxy_sk_is_transparent has also been refactored to use this function
      instead of reimplementing it.
      Signed-off-by: default avatarMáté Eckl <ecklm94@gmail.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      8d6e5557