1. 20 12月, 2017 20 次提交
  2. 19 12月, 2017 16 次提交
    • B
      tg3: Fix rx hang on MTU change with 5717/5719 · 748a240c
      Brian King 提交于
      This fixes a hang issue seen when changing the MTU size from 1500 MTU
      to 9000 MTU on both 5717 and 5719 chips. In discussion with Broadcom,
      they've indicated that these chipsets have the same phy as the 57766
      chipset, so the same workarounds apply. This has been tested by IBM
      on both Power 8 and Power 9 systems as well as by Broadcom on x86
      hardware and has been confirmed to resolve the hang issue.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      748a240c
    • D
      Merge tag 'mac80211-for-davem-2017-12-19' of... · c6479d62
      David S. Miller 提交于
      Merge tag 'mac80211-for-davem-2017-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      
      Johannes Berg says:
      
      ====================
      A few more fixes:
       * hwsim:
         - set To-DS bit in some frames missing it
         - fix sleeping in atomic
       * nl80211:
         - doc cleanup
         - fix locking in an error path
       * build:
         - don't append to created certs C files
         - ship certificate pre-hexdumped
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6479d62
    • J
      cfg80211: ship certificates as hex files · 04a7279f
      Johannes Berg 提交于
      Not only does this remove the need for the hexdump code in most
      normal kernel builds (still there for the extra directory), but
      it also removes the need to ship binary files, which apparently
      is somewhat problematic, as Randy reported.
      
      While at it, also add the generated files to clean-files.
      Reported-by: NRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      04a7279f
    • J
      nl80211: Remove obsolete kerneldoc line · 958a1b5a
      Jonathan Corbet 提交于
      Commit ca986ad9 (nl80211: allow multiple active scheduled scan
      requests) removed WIPHY_FLAG_SUPPORTS_SCHED_SCAN but left the kerneldoc
      description in place, leading to this docs-build warning:
      
         ./include/net/cfg80211.h:3278: warning: Excess enum value
                 'WIPHY_FLAG_SUPPORTS_SCHED_SCAN' description in 'wiphy_flags'
      
      Remove the line and gain a bit of peace.
      Signed-off-by: NJonathan Corbet <corbet@lwn.net>
      Acked-by: NArend van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      958a1b5a
    • J
      mac80211_hwsim: Fix a possible sleep-in-atomic bug in hwsim_get_radio_nl · 162bd5e5
      Jia-Ju Bai 提交于
      The driver may sleep under a spinlock.
      The function call path is:
      hwsim_get_radio_nl (acquire the spinlock)
        nlmsg_new(GFP_KERNEL) --> may sleep
      
      To fix it, GFP_KERNEL is replaced with GFP_ATOMIC.
      
      This bug is found by my static analysis tool(DSAC) and checked by my code review.
      Signed-off-by: NJia-Ju Bai <baijiaju1990@163.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      162bd5e5
    • T
      cfg80211: always rewrite generated files from scratch · 5d324073
      Thierry Reding 提交于
      Currently the certs C code generation appends to the generated files,
      which is most likely a leftover from commit 715a1233 ("wireless:
      don't write C files on failures"). This causes duplicate code in the
      generated files if the certificates have their timestamps modified
      between builds and thereby trigger the generation rules.
      
      Fixes: 715a1233 ("wireless: don't write C files on failures")
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      5d324073
    • A
      mac80211_hwsim: enable TODS BIT in null data frame · b65c7b8a
      Adiel Aloni 提交于
      Same as in ieee80211_nullfunc_get, enable the TODS bit, otherwise the
      nullfunc packet will not be handled in ap rx path.
      (will be dropped in ieee80211_accept_frame()).
      Signed-off-by: NAdiel Aloni <adiel.aloni@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b65c7b8a
    • A
      net: phy: xgene: disable clk on error paths · ab144360
      Alexey Khoroshilov 提交于
      There are several error paths in xgene_mdio_probe(),
      where clk is left undisabled. The patch fixes them.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab144360
    • R
      net: phy: marvell: avoid pause mode on SGMII-to-Copper for 88e151x · 6623c0fb
      Russell King 提交于
      Observed on the 88e1512 in SGMII-to-Copper mode, negotiating pause
      is unreliable.  While the pause bits can be set in the advertisment
      register, they clear shortly after negotiation with a link partner
      commences irrespective of the cause of the negotiation.
      
      While these bits may be correctly conveyed to the link partner on the
      first negotiation, a subsequent negotiation (eg, due to negotiation
      restart by the link partner, or reconnection of the cable) will result
      in the link partner seeing these bits as zero, while the kernel
      believes that it has advertised pause modes.
      
      This leads to the local kernel evaluating (eg) symmetric pause mode,
      while the remote end evaluates that we have no pause mode capability.
      
      Since we can't guarantee the advertisment, disable pause mode support
      with this PHY when used in SGMII-to-Copper mode.
      
      The 88e1510 in RGMII-to-Copper mode appears to behave correctly.
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6623c0fb
    • N
      net: bridge: fix early call to br_stp_change_bridge_id and plug newlink leaks · 84aeb437
      Nikolay Aleksandrov 提交于
      The early call to br_stp_change_bridge_id in bridge's newlink can cause
      a memory leak if an error occurs during the newlink because the fdb
      entries are not cleaned up if a different lladdr was specified, also
      another minor issue is that it generates fdb notifications with
      ifindex = 0. Another unrelated memory leak is the bridge sysfs entries
      which get added on NETDEV_REGISTER event, but are not cleaned up in the
      newlink error path. To remove this special case the call to
      br_stp_change_bridge_id is done after netdev register and we cleanup the
      bridge on changelink error via br_dev_delete to plug all leaks.
      
      This patch makes netlink bridge destruction on newlink error the same as
      dellink and ioctl del which is necessary since at that point we have a
      fully initialized bridge device.
      
      To reproduce the issue:
      $ ip l add br0 address 00:11:22:33:44:55 type bridge group_fwd_mask 1
      RTNETLINK answers: Invalid argument
      
      $ rmmod bridge
      [ 1822.142525] =============================================================================
      [ 1822.143640] BUG bridge_fdb_cache (Tainted: G           O    ): Objects remaining in bridge_fdb_cache on __kmem_cache_shutdown()
      [ 1822.144821] -----------------------------------------------------------------------------
      
      [ 1822.145990] Disabling lock debugging due to kernel taint
      [ 1822.146732] INFO: Slab 0x0000000092a844b2 objects=32 used=2 fp=0x00000000fef011b0 flags=0x1ffff8000000100
      [ 1822.147700] CPU: 2 PID: 13584 Comm: rmmod Tainted: G    B      O     4.15.0-rc2+ #87
      [ 1822.148578] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
      [ 1822.150008] Call Trace:
      [ 1822.150510]  dump_stack+0x78/0xa9
      [ 1822.151156]  slab_err+0xb1/0xd3
      [ 1822.151834]  ? __kmalloc+0x1bb/0x1ce
      [ 1822.152546]  __kmem_cache_shutdown+0x151/0x28b
      [ 1822.153395]  shutdown_cache+0x13/0x144
      [ 1822.154126]  kmem_cache_destroy+0x1c0/0x1fb
      [ 1822.154669]  SyS_delete_module+0x194/0x244
      [ 1822.155199]  ? trace_hardirqs_on_thunk+0x1a/0x1c
      [ 1822.155773]  entry_SYSCALL_64_fastpath+0x23/0x9a
      [ 1822.156343] RIP: 0033:0x7f929bd38b17
      [ 1822.156859] RSP: 002b:00007ffd160e9a98 EFLAGS: 00000202 ORIG_RAX: 00000000000000b0
      [ 1822.157728] RAX: ffffffffffffffda RBX: 00005578316ba090 RCX: 00007f929bd38b17
      [ 1822.158422] RDX: 00007f929bd9ec60 RSI: 0000000000000800 RDI: 00005578316ba0f0
      [ 1822.159114] RBP: 0000000000000003 R08: 00007f929bff5f20 R09: 00007ffd160e8a11
      [ 1822.159808] R10: 00007ffd160e9860 R11: 0000000000000202 R12: 00007ffd160e8a80
      [ 1822.160513] R13: 0000000000000000 R14: 0000000000000000 R15: 00005578316ba090
      [ 1822.161278] INFO: Object 0x000000007645de29 @offset=0
      [ 1822.161666] INFO: Object 0x00000000d5df2ab5 @offset=128
      
      Fixes: 30313a3d ("bridge: Handle IFLA_ADDRESS correctly when creating bridge device")
      Fixes: 5b8d5429 ("bridge: netlink: register netdevice before executing changelink")
      Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      84aeb437
    • X
      sctp: add SCTP_CID_RECONF conversion in sctp_cname · d1969759
      Xin Long 提交于
      Whenever a new type of chunk is added, the corresp conversion in
      sctp_cname should be added. Otherwise, in some places, pr_debug
      will print it as "unknown chunk".
      
      Fixes: cc16f00f ("sctp: add support for generating stream reconf ssn reset request chunk")
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NMarcelo R. Leitner <marcelo.leitner@gmail.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d1969759
    • X
      sctp: fix the issue that a __u16 variable may overflow in sctp_ulpq_renege · 5c468674
      Xin Long 提交于
      Now when reneging events in sctp_ulpq_renege(), the variable freed
      could be increased by a __u16 value twice while freed is of __u16
      type. It means freed may overflow at the second addition.
      
      This patch is to fix it by using __u32 type for 'freed', while at
      it, also to remove 'if (chunk)' check, as all renege commands are
      generated in sctp_eat_data and it can't be NULL.
      Reported-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c468674
    • H
      net: qcom/emac: Change the order of mac up and sgmii open · ac3241d5
      Hemanth Puranik 提交于
      This patch fixes the order of mac_up and sgmii_open for the
      reasons noted below:
      
      - If open takes more time(if the SGMII block is not responding or
        if we want to do some delay based task) in this situation we
        will hit NETDEV watchdog
      - The main reason : We should signal to upper layers that we are
        ready to receive packets "only" when the entire path is initialized
        not the other way around, this is followed in the reset path where
        we do mac_down, sgmii_reset and mac_up. This also makes the driver
        uniform across the reset and open paths.
      - In the future there may be need for delay based tasks to be done in
        sgmii open which will result in NETDEV watchdog
      - As per the documentation the order of init should be sgmii, mac, rings
        and DMA
      Signed-off-by: NHemanth Puranik <hpuranik@codeaurora.org>
      Acked-by: NTimur Tabi <timur@codeaurora.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ac3241d5
    • Z
      net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as well. · c505873e
      Zhao Qiang 提交于
      88E1145 also need this autoneg errata.
      
      Fixes: f2899788 ("net: phy: marvell: Limit errata to 88m1101")
      Signed-off-by: NZhao Qiang <qiang.zhao@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c505873e
    • J
      tipc: remove leaving group member from all lists · 3f42f5fe
      Jon Maloy 提交于
      A group member going into state LEAVING should never go back to any
      other state before it is finally deleted. However, this might happen
      if the socket needs to send out a RECLAIM message during this interval.
      Since we forget to remove the leaving member from the group's 'active'
      or 'pending' list, the member might be selected for reclaiming, change
      state to RECLAIMING, and get stuck in this state instead of being
      deleted. This might lead to suppression of the expected 'member down'
      event to the receiver.
      
      We fix this by removing the member from all lists, except the RB tree,
      at the moment it goes into state LEAVING.
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3f42f5fe
    • J
      tipc: fix lost member events bug · 23483399
      Jon Maloy 提交于
      Group messages are not supposed to be returned to sender when the
      destination socket disappears. This is done correctly for regular
      traffic messages, by setting the 'dest_droppable' bit in the header.
      But we forget to do that in group protocol messages. This has the effect
      that such messages may sometimes bounce back to the sender, be perceived
      as a legitimate peer message, and wreak general havoc for the rest of
      the session. In particular, we have seen that a member in state LEAVING
      may go back to state RECLAIMED or REMITTED, hence causing suppression
      of an otherwise expected 'member down' event to the user.
      
      We fix this by setting the 'dest_droppable' bit even in group protocol
      messages.
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      23483399
  3. 18 12月, 2017 1 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · b36025b1
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2017-12-17
      
      The following pull-request contains BPF updates for your *net* tree.
      
      The main changes are:
      
      1) Fix a corner case in generic XDP where we have non-linear skbs
         but enough tailroom in the skb to not miss to linearizing there,
         from Song.
      
      2) Fix BPF JIT bugs in s390x and ppc64 to not recache skb data when
         BPF context is not skb, from Daniel.
      
      3) Fix a BPF JIT bug in sparc64 where recaching skb data after helper
         call would use the wrong register for the skb, from Daniel.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b36025b1
  4. 17 12月, 2017 3 次提交
    • A
      vxlan: restore dev->mtu setting based on lower device · f870c1ff
      Alexey Kodanev 提交于
      Stefano Brivio says:
          Commit a985343b ("vxlan: refactor verification and
          application of configuration") introduced a change in the
          behaviour of initial MTU setting: earlier, the MTU for a link
          created on top of a given lower device, without an initial MTU
          specification, was set to the MTU of the lower device minus
          headroom as a result of this path in vxlan_dev_configure():
      
      	if (!conf->mtu)
      		dev->mtu = lowerdev->mtu -
      			   (use_ipv6 ? VXLAN6_HEADROOM : VXLAN_HEADROOM);
      
          which is now gone. Now, the initial MTU, in absence of a
          configured value, is simply set by ether_setup() to ETH_DATA_LEN
          (1500 bytes).
      
          This breaks userspace expectations in case the MTU of
          the lower device is higher than 1500 bytes minus headroom.
      
      This patch restores the previous behaviour on newlink operation. Since
      max_mtu can be negative and we update dev->mtu directly, also check it
      for valid minimum.
      Reported-by: NJunhan Yan <juyan@redhat.com>
      Fixes: a985343b ("vxlan: refactor verification and application of configuration")
      Signed-off-by: NAlexey Kodanev <alexey.kodanev@oracle.com>
      Acked-by: NStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: NStefano Brivio <sbrivio@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f870c1ff
    • B
      ipv6: icmp6: Allow icmp messages to be looped back · 588753f1
      Brendan McGrath 提交于
      One example of when an ICMPv6 packet is required to be looped back is
      when a host acts as both a Multicast Listener and a Multicast Router.
      
      A Multicast Router will listen on address ff02::16 for MLDv2 messages.
      
      Currently, MLDv2 messages originating from a Multicast Listener running
      on the same host as the Multicast Router are not being delivered to the
      Multicast Router. This is due to dst.input being assigned the default
      value of dst_discard.
      
      This results in the packet being looped back but discarded before being
      delivered to the Multicast Router.
      
      This patch sets dst.input to ip6_input to ensure a looped back packet
      is delivered to the Multicast Router.
      Signed-off-by: NBrendan McGrath <redmcg@redmandi.dyndns.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      588753f1
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · f3b5ad89
      Linus Torvalds 提交于
      Pull rdma fixes from Jason Gunthorpe:
       "More fixes from testing done on the rc kernel, including more SELinux
        testing. Looking forward, lockdep found regression today in ipoib
        which is still being fixed.
      
        Summary:
      
         - Fix for SELinux on the umad SMI path. Some old hardware does not
           fill the PKey properly exposing another bug in the newer SELinux
           code.
      
         - Check the input port as we can exceed array bounds from this user
           supplied value
      
         - Users are unable to use the hash field support as they want due to
           incorrect checks on the field restrictions, correct that so the
           feature works as intended
      
         - User triggerable oops in the NETLINK_RDMA handler
      
         - cxgb4 driver fix for a bad interaction with CQ flushing in iser
           caused by patches in this merge window, and bad CQ flushing during
           normal close.
      
         - Unbalanced memalloc_noio in ipoib in an error path"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        IB/ipoib: Restore MM behavior in case of tx_ring allocation failure
        iw_cxgb4: only insert drain cqes if wq is flushed
        iw_cxgb4: only clear the ARMED bit if a notification is needed
        RDMA/netlink: Fix general protection fault
        IB/mlx4: Fix RSS hash fields restrictions
        IB/core: Don't enforce PKey security on SMI MADs
        IB/core: Bound check alternate path port number
      f3b5ad89