1. 17 10月, 2017 1 次提交
    • X
      rtnetlink: bring NETDEV_CHANGEMTU event process back in rtnetlink_event · 8a212589
      Xin Long 提交于
      Commit 085e1a65 ("rtnetlink: Do not generate notifications for MTU
      events") tried to fix the redundant notifications issue when ip link
      set mtu by removing NETDEV_CHANGEMTU event process in rtnetlink_event.
      
      But it also resulted in no notification generated when dev's mtu is
      changed via other methods, like:
        'ifconfig eth1 mtu 1400' or 'echo 1400 > /sys/class/net/eth1/mtu'
      It would cause users not to be notified by this change.
      
      This patch is to fix it by bringing NETDEV_CHANGEMTU event back into
      rtnetlink_event, and the redundant notifications issue will be fixed
      in the later patch 'rtnetlink: check DO_SETLINK_NOTIFY correctly in
      do_setlink'.
      
      Fixes: 085e1a65 ("rtnetlink: Do not generate notifications for MTU events")
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8a212589
  2. 15 10月, 2017 10 次提交
  3. 14 10月, 2017 2 次提交
  4. 13 10月, 2017 2 次提交
    • D
      Merge tag 'wireless-drivers-for-davem-2017-10-13' of... · db5972c9
      David S. Miller 提交于
      Merge tag 'wireless-drivers-for-davem-2017-10-13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers
      
      Kalle Valo says:
      
      ====================
      wireless-drivers fixes for 4.14
      
      Nothing really special standing out, all of these are important fixes
      which should go to 4.14.
      
      iwlwifi
      
      * fix support for 3168 device series
      
      * fix a potential crash when using FW debugging recording;
      
      * improve channel flags parsing to avoid warnings on too long traces
      
      * return -ENODATA when the temperature is not available, since the
       -EIO we were returning was causing fatal errors in userspace
      
      * avoid printing too many messages in dmesg when using monitor mode,
        since this can become very noisy and completely flood the logs
      
      brcmsmac
      
      * reduce stack usage to avoid frame size warnings with KASAN
      
      brcmfmac
      
      * add a check to avoid copying uninitialised memory
      
      rtlwifi:
      
      * fix a regression with rtl8821ae starting from v4.11 where
        connections was frequently lost
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db5972c9
    • S
      ip: update policy routing config help · 12ed3772
      Stephen Hemminger 提交于
      The kernel config help for policy routing was still pointing at
      an ancient document from 2000 that refers to Linux 2.1. Update it
      to point to something that is at least occasionally updated.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12ed3772
  5. 12 10月, 2017 3 次提交
    • S
      net/ncsi: Don't limit vids based on hot_channel · 6e9c0075
      Samuel Mendoza-Jonas 提交于
      Currently we drop any new VLAN ids if there are more than the current
      (or last used) channel can support. Most importantly this is a problem
      if no channel has been selected yet, resulting in a segfault.
      
      Secondly this does not necessarily reflect the capabilities of any other
      channels. Instead only drop a new VLAN id if we are already tracking the
      maximum allowed by the NCSI specification. Per-channel limits are
      already handled by ncsi_add_filter(), but add a message to set_one_vid()
      to make it obvious that the channel can not support any more VLAN ids.
      Signed-off-by: NSamuel Mendoza-Jonas <sam@mendozajonas.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e9c0075
    • D
      r8169: only enable PCI wakeups when WOL is active · bde135a6
      Daniel Drake 提交于
      rtl_init_one() currently enables PCI wakeups if the ethernet device
      is found to be WOL-capable. There is no need to do this when
      rtl8169_set_wol() will correctly enable or disable the same wakeup flag
      when WOL is activated/deactivated.
      
      This works around an ACPI DSDT bug which prevents the Acer laptop models
      Aspire ES1-533, Aspire ES1-732, PackardBell ENTE69AP and Gateway NE533
      from entering S3 suspend - even when no ethernet cable is connected.
      
      On these platforms, the DSDT says that GPE08 is a wakeup source for
      ethernet, but this GPE fires as soon as the system goes into suspend,
      waking the system up immediately. Having the wakeup normally disabled
      avoids this issue in the default case.
      
      With this change, WOL will continue to be unusable on these platforms
      (it will instantly wake up if WOL is later enabled by the user) but we
      do not expect this to be a commonly used feature on these consumer
      laptops. We have separately determined that WOL works fine without any
      ACPI GPEs enabled during sleep, so a DSDT fix or override would be
      possible to make WOL work.
      Signed-off-by: NDaniel Drake <drake@endlessm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bde135a6
    • S
      macsec: fix memory leaks when skb_to_sgvec fails · 5aba2ba5
      Sabrina Dubroca 提交于
      Fixes: cda7ea69 ("macsec: check return value of skb_to_sgvec always")
      Signed-off-by: NSabrina Dubroca <sd@queasysnail.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5aba2ba5
  6. 11 10月, 2017 7 次提交
  7. 10 10月, 2017 15 次提交
    • A
      i40e: Fix memory leak related filter programming status · 2b9478ff
      Alexander Duyck 提交于
      It looks like we weren't correctly placing the pages from buffers that had
      been used to return a filter programming status back on the ring. As a
      result they were being overwritten and tracking of the pages was lost.
      
      This change works to correct that by incorporating part of
      i40e_put_rx_buffer into the programming status handler code. As a result we
      should now be correctly placing the pages for those buffers on the
      re-allocation list instead of letting them stay in place.
      
      Fixes: 0e626ff7 ("i40e: Fix support for flow director programming status")
      Reported-by: NAnders K. Pedersen <akp@cohaesio.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Tested-by: NAnders K Pedersen <akp@cohaesio.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      2b9478ff
    • S
      i40e: Fix comment about locking for __i40e_read_nvm_word() · e836e321
      Stefano Brivio 提交于
      Caller needs to acquire the lock. Called functions will not.
      
      Fixes: 09f79fd4 ("i40e: avoid NVM acquire deadlock during NVM update")
      Signed-off-by: NStefano Brivio <sbrivio@redhat.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e836e321
    • E
      net: defer call to cgroup_sk_alloc() · fbb1fb4a
      Eric Dumazet 提交于
      sk_clone_lock() might run while TCP/DCCP listener already vanished.
      
      In order to prevent use after free, it is better to defer cgroup_sk_alloc()
      to the point we know both parent and child exist, and from process context.
      
      Fixes: e994b2f0 ("tcp: do not lock listener to process SYN packets")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fbb1fb4a
    • E
      net: memcontrol: defer call to mem_cgroup_sk_alloc() · 9f1c2674
      Eric Dumazet 提交于
      Instead of calling mem_cgroup_sk_alloc() from BH context,
      it is better to call it from inet_csk_accept() in process context.
      
      Not only this removes code in mem_cgroup_sk_alloc(), but it also
      fixes a bug since listener might have been dismantled and css_get()
      might cause a use-after-free.
      
      Fixes: e994b2f0 ("tcp: do not lock listener to process SYN packets")
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Tejun Heo <tj@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9f1c2674
    • L
      Merge branch 'ppc-bundle' (bundle from Michael Ellerman) · 529a86e0
      Linus Torvalds 提交于
      Merge powerpc transactional memory fixes from Michael Ellerman:
       "I figured I'd still send you the commits using a bundle to make sure
        it works in case I need to do it again in future"
      
      This fixes transactional memory state restore for powerpc.
      
      * bundle'd patches from Michael Ellerman:
        powerpc/tm: Fix illegal TM state in signal handler
        powerpc/64s: Use emergency stack for kernel TM Bad Thing program checks
      529a86e0
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · ff33952e
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Fix object leak on IPSEC offload failure, from Steffen Klassert.
      
       2) Fix range checks in ipset address range addition operations, from
          Jozsef Kadlecsik.
      
       3) Fix pernet ops unregistration order in ipset, from Florian Westphal.
      
       4) Add missing netlink attribute policy for nl80211 packet pattern
          attrs, from Peng Xu.
      
       5) Fix PPP device destruction race, from Guillaume Nault.
      
       6) Write marks get lost when BPF verifier processes R1=R2 register
          assignments, causing incorrect liveness information and less state
          pruning. Fix from Alexei Starovoitov.
      
       7) Fix blockhole routes so that they are marked dead and therefore not
          cached in sockets, otherwise IPSEC stops working. From Steffen
          Klassert.
      
       8) Fix broadcast handling of UDP socket early demux, from Paolo Abeni.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (37 commits)
        cdc_ether: flag the u-blox TOBY-L2 and SARA-U2 as wwan
        net: thunderx: mark expected switch fall-throughs in nicvf_main()
        udp: fix bcast packet reception
        netlink: do not set cb_running if dump's start() errs
        ipv4: Fix traffic triggered IPsec connections.
        ipv6: Fix traffic triggered IPsec connections.
        ixgbe: incorrect XDP ring accounting in ethtool tx_frame param
        net: ixgbe: Use new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag
        Revert commit 1a8b6d76 ("net:add one common config...")
        ixgbe: fix masking of bits read from IXGBE_VXLANCTRL register
        ixgbe: Return error when getting PHY address if PHY access is not supported
        netfilter: xt_bpf: Fix XT_BPF_MODE_FD_PINNED mode of 'xt_bpf_info_v1'
        netfilter: SYNPROXY: skip non-tcp packet in {ipv4, ipv6}_synproxy_hook
        tipc: Unclone message at secondary destination lookup
        tipc: correct initialization of skb list
        gso: fix payload length when gso_size is zero
        mlxsw: spectrum_router: Avoid expensive lookup during route removal
        bpf: fix liveness marking
        doc: Fix typo "8023.ad" in bonding documentation
        ipv6: fix net.ipv6.conf.all.accept_dad behaviour for real
        ...
      ff33952e
    • A
      cdc_ether: flag the u-blox TOBY-L2 and SARA-U2 as wwan · fdfbad32
      Aleksander Morgado 提交于
      The u-blox TOBY-L2 is a LTE Cat 4 module with HSPA+ and 2G fallback.
      This module allows switching to different USB profiles with the
      'AT+UUSBCONF' command, and provides a ECM network interface when the
      'AT+UUSBCONF=2' profile is selected.
      
      The u-blox SARA-U2 is a HSPA module with 2G fallback. The default USB
      configuration includes a ECM network interface.
      
      Both these modules are controlled via AT commands through one of the
      TTYs exposed. Connecting these modules may be done just by activating
      the desired PDP context with 'AT+CGACT=1,<cid>' and then running DHCP
      on the ECM interface.
      Signed-off-by: NAleksander Morgado <aleksander@aleksander.es>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fdfbad32
    • L
      Merge tag 'nfs-for-4.14-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 68ebe3cb
      Linus Torvalds 提交于
      Pull NFS client bugfixes from Trond Myklebust:
       "Hightlights include:
      
        stable fixes:
         - nfs/filelayout: fix oops when freeing filelayout segment
         - NFS: Fix uninitialized rpc_wait_queue
      
        bugfixes:
         - NFSv4/pnfs: Fix an infinite layoutget loop
         - nfs: RPC_MAX_AUTH_SIZE is in bytes"
      
      * tag 'nfs-for-4.14-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFSv4/pnfs: Fix an infinite layoutget loop
        nfs/filelayout: fix oops when freeing filelayout segment
        sunrpc: remove redundant initialization of sock
        NFS: Fix uninitialized rpc_wait_queue
        NFS: Cleanup error handling in nfs_idmap_request_key()
        nfs: RPC_MAX_AUTH_SIZE is in bytes
      68ebe3cb
    • G
      net: thunderx: mark expected switch fall-throughs in nicvf_main() · 1a2ace56
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      Cc: Sunil Goutham <sgoutham@cavium.com>
      Cc: Robert Richter <rric@kernel.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a2ace56
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · fb60bccc
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS fixes for net
      
      The following patchset contains Netfilter/IPVS fixes for your net tree,
      they are:
      
      1) Fix packet drops due to incorrect ECN handling in IPVS, from Vadim
         Fedorenko.
      
      2) Fix splat with mark restoration in xt_socket with non-full-sock,
         patch from Subash Abhinov Kasiviswanathan.
      
      3) ipset bogusly bails out when adding IPv4 range containing more than
         2^31 addresses, from Jozsef Kadlecsik.
      
      4) Incorrect pernet unregistration order in ipset, from Florian Westphal.
      
      5) Races between dump and swap in ipset results in BUG_ON splats, from
         Ross Lagerwall.
      
      6) Fix chain renames in nf_tables, from JingPiao Chen.
      
      7) Fix race in pernet codepath with ebtables table registration, from
         Artem Savkov.
      
      8) Memory leak in error path in set name allocation in nf_tables, patch
         from Arvind Yadav.
      
      9) Don't dump chain counters if they are not available, this fixes a
         crash when listing the ruleset.
      
      10) Fix out of bound memory read in strlcpy() in x_tables compat code,
          from Eric Dumazet.
      
      11) Make sure we only process TCP packets in SYNPROXY hooks, patch from
          Lin Zhang.
      
      12) Cannot load rules incrementally anymore after xt_bpf with pinned
          objects, added in revision 1. From Shmulik Ladkani.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fb60bccc
    • D
      Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue · 5766cd68
      David S. Miller 提交于
      Jeff Kirsher says:
      
      ====================
      Intel Wired LAN Driver Updates 2017-10-09
      
      This series contains updates to ixgbe and arch/Kconfig.
      
      Mark fixes a case where PHY register access is not supported and we were
      returning a PHY address, when we should have been returning -EOPNOTSUPP.
      
      Sabrina Dubroca fixes the use of a logical "and" when it should have been
      the bitwise "and" operator.
      
      Ding Tianhong reverts the commit that added the Kconfig bool option
      ARCH_WANT_RELAX_ORDER, since there is now a new flag
      PCI_DEV_FLAGS_NO_RELAXED_ORDERING that has been added to indicate that
      Relaxed Ordering Attributes should not be used for Transaction Layer
      Packets.  Then follows up with making the needed changes to ixgbe to
      use the new PCI_DEV_FLAGS_NO_RELAXED_ORDERING flag.
      
      John Fastabend fixes an issue in the ring accounting when the transmit
      ring parameters are changed via ethtool when an XDP program is attached.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5766cd68
    • P
      udp: fix bcast packet reception · 996b44fc
      Paolo Abeni 提交于
      The commit bc044e8d ("udp: perform source validation for
      mcast early demux") does not take into account that broadcast packets
      lands in the same code path and they need different checks for the
      source address - notably, zero source address are valid for bcast
      and invalid for mcast.
      
      As a result, 2nd and later broadcast packets with 0 source address
      landing to the same socket are dropped. This breaks dhcp servers.
      
      Since we don't have stringent performance requirements for ingress
      broadcast traffic, fix it by disabling UDP early demux such traffic.
      Reported-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Fixes: bc044e8d ("udp: perform source validation for mcast early demux")
      Signed-off-by: NPaolo Abeni <pabeni@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      996b44fc
    • J
      netlink: do not set cb_running if dump's start() errs · 41c87425
      Jason A. Donenfeld 提交于
      It turns out that multiple places can call netlink_dump(), which means
      it's still possible to dereference partially initialized values in
      dump() that were the result of a faulty returned start().
      
      This fixes the issue by calling start() _before_ setting cb_running to
      true, so that there's no chance at all of hitting the dump() function
      through any indirect paths.
      
      It also moves the call to start() to be when the mutex is held. This has
      the nice side effect of serializing invocations to start(), which is
      likely desirable anyway. It also prevents any possible other races that
      might come out of this logic.
      
      In testing this with several different pieces of tricky code to trigger
      these issues, this commit fixes all avenues that I'm aware of.
      Signed-off-by: NJason A. Donenfeld <Jason@zx2c4.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Reviewed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      41c87425
    • D
      Merge tag 'mac80211-for-davem-2017-10-09' of... · 6df4d17c
      David S. Miller 提交于
      Merge tag 'mac80211-for-davem-2017-10-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      
      Johannes Berg says:
      
      ====================
      pull-request: mac80211 2017-10-09
      
      The QCA folks found another netlink problem - we were missing validation
      of some attributes. It's not super problematic since one can only read a
      few bytes beyond the message (and that memory must exist), but here's the
      fix for it.
      
      I thought perhaps we can make nla_parse_nested() require a policy, but
      given the two-stage validation/parsing in regular netlink that won't work.
      
      Please pull and let me know if there's any problem.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6df4d17c
    • D
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec · 93b03193
      David S. Miller 提交于
      Steffen Klassert says:
      
      ====================
      pull request (net): ipsec 2017-10-09
      
      1) Fix some error paths of the IPsec offloading API.
      
      2) Fix a NULL pointer dereference when IPsec is used
         with vti. From Alexey Kodanev.
      
      3) Don't call xfrm_policy_cache_flush under xfrm_state_lock,
         it triggers several locking warnings. From Artem Savkov.
      
      Please pull or let me know if there are problems.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      93b03193