Skip to content
  1. May 25, 2019
    • Waiman Long's avatar
      locking/lock_events: Use this_cpu_add() when necessary · 51816e9e
      Waiman Long authored
      The kernel test robot has reported that the use of __this_cpu_add()
      causes bug messages like:
      
        BUG: using __this_cpu_add() in preemptible [00000000] code: ...
      
      Given the imprecise nature of the count and the possibility of resetting
      the count and doing the measurement again, this is not really a big
      problem to use the unprotected __this_cpu_*() functions.
      
      To make the preemption checking code happy, the this_cpu_*() functions
      will be used if CONFIG_DEBUG_PREEMPT is defined.
      
      The imprecise nature of the locking counts are also documented with
      the suggestion that we should run the measurement a few times with the
      counts reset in between to get a better picture of what is going on
      under the hood.
      
      Fixes: a8654596
      
       ("locking/rwsem: Enable lock event counting")
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      51816e9e
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 0a72ef89
      Linus Torvalds authored
      Pull more arm64 fixes from Will Deacon:
      
       - Fix incorrect LDADD instruction encoding in our disassembly macros
      
       - Disable the broken ARM64_PSEUDO_NMI support for now
      
       - Add workaround for Cortex-A76 CPU erratum #1463225
      
       - Handle Cortex-A76/Neoverse-N1 erratum #1418040 w/ existing workaround
      
       - Fix IORT build failure if IOMMU_SUPPORT=n
      
       - Fix place-relative module relocation range checking and its
         interaction with KASLR
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: insn: Add BUILD_BUG_ON() for invalid masks
        arm64: insn: Fix ldadd instruction encoding
        arm64: Kconfig: Make ARM64_PSEUDO_NMI depend on BROKEN for now
        arm64: Handle erratum 1418040 as a superset of erratum 1188873
        arm64/module: deal with ambiguity in PRELxx relocation ranges
        ACPI/IORT: Fix build error when IOMMU_SUPPORT is disabled
        arm64/kernel: kaslr: reduce module randomization range to 2 GB
        arm64: errata: Add workaround for Cortex-A76 erratum #1463225
        arm64: Remove useless message during oops
      0a72ef89
    • Linus Torvalds's avatar
      Merge tag 'platform-drivers-x86-v5.2-2' of git://git.infradead.org/linux-platform-drivers-x86 · c50bbf61
      Linus Torvalds authored
      Pull x86 platform driver fixes from Andy Shevchenko:
       "Some of Intel Cherrytrail based platforms depend on PMC clock to be
        always on. Here are a couple of quirks to the driver to support
        affected hardware"
      
      * tag 'platform-drivers-x86-v5.2-2' of git://git.infradead.org/linux-platform-drivers-x86:
        platform/x86: pmc_atom: Add several Beckhoff Automation boards to critclk_systems DMI table
        platform/x86: pmc_atom: Add Lex 3I380D industrial PC to critclk_systems DMI table
      c50bbf61
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal · 49bbd8bb
      Linus Torvalds authored
      Pull thermal SoC fixes from Eduardo Valentin:
      
       - revert pinctrl settings on rockchip which causes boot failure on
         rk3288. The proper follow-up patch is being discussed, meanwhile
         the revert gets those booting again.
      
       - minor fixes on rcar and tegra
      
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal:
        thermal: rcar_gen3_thermal: Update temperature conversion method
        thermal: rcar_gen3_thermal: Update calculation formula of IRQTEMP
        thermal: rcar_gen3_thermal: Update value of Tj_1
        thermal: tegra: Make tegra210_tsensor_thermtrips static
        Revert "thermal: rockchip: fix up the tsadc pinctrl setting error"
      49bbd8bb
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · e50e6798
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "Fix HS50 data hold time problem for a few variants of sdhci-iproc"
      
      * tag 'mmc-v5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci-iproc: Set NO_HISPD bit to fix HS50 data hold time problem
        mmc: sdhci-iproc: cygnus: Set NO_HISPD bit to fix HS50 data hold time problem
      e50e6798
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-05-24-1' of git://anongit.freedesktop.org/drm/drm · a3b25d15
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Nothing too unusual here for rc2. Except the amdgpu DMCU firmware
        loading fix caused build breakage with a different set of Kconfig
        options. I've just reverted it for now until the AMD folks can rewrite
        it to avoid that problem.
      
        i915:
         - boosting fix
         - bump ready task fixes
         - GVT - reset fix, error return, TRTT handling fix
      
        amdgpu:
         - DMCU firmware loading fix
         - Polaris 10 pci id for kfd
         - picasso screen corruption fix
         - SR-IOV fixes
         - vega driver reload fixes
         - SMU locking fix
         - compute profile fix for kfd
      
        vmwgfx:
         - integer overflow fixes
         - dma sg fix
      
        sun4i:
         - HDMI phy fixes
      
        gma500:
         - LVDS detection fix
      
        panfrost:
         - devfreq selection fix"
      
      * tag 'drm-fixes-2019-05-24-1' of git://anongit.freedesktop.org/drm/drm: (32 commits)
        Revert "drm/amd/display: Don't load DMCU for Raven 1"
        drm/panfrost: Select devfreq
        drm/gma500/cdv: Check vbt config bits when detecting lvds panels
        drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read
        drm/vmwgfx: NULL pointer dereference from vmw_cmd_dx_view_define()
        drm/vmwgfx: Use the dma scatter-gather iterator to get dma addresses
        drm/vmwgfx: Fix compat mode shader operation
        drm/vmwgfx: Fix user space handle equal to zero
        drm/vmwgfx: Don't send drm sysfs hotplug events on initial master set
        drm/i915/gvt: Fix an error code in ppgtt_populate_spt_by_guest_entry()
        drm/i915/gvt: do not let TRTTE and 0x4dfc write passthrough to hardware
        drm/i915/gvt: add 0x4dfc to gen9 save-restore list
        drm/i915/gvt: Tiled Resources mmios are in-context mmios for gen9+
        drm/i915/gvt: use cmd to restore in-context mmios to hw for gen9 platform
        drm/i915/gvt: emit init breadcrumb for gvt request
        drm/amdkfd: Fix compute profile switching
        drm/amdgpu: skip fw pri bo alloc for SRIOV
        drm/amd/powerplay: fix locking in smu_feature_set_supported()
        drm/amdgpu/gmc9: set vram_width properly for SR-IOV
        drm/amdgpu/soc15: skip reset on init
        ...
      a3b25d15
  2. May 24, 2019
  3. May 23, 2019
  4. May 22, 2019
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 54dee406
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
      
       - Fix SPE probe failure when backing auxbuf with high-order pages
      
       - Fix handling of DMA allocations from outside of the vmalloc area
      
       - Fix generation of build-id ELF section for vDSO object
      
       - Disable huge I/O mappings if kernel page table dumping is enabled
      
       - A few other minor fixes (comments, kconfig etc)
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: vdso: Explicitly add build-id option
        arm64/mm: Inhibit huge-vmap with ptdump
        arm64: Print physical address of page table base in show_pte()
        arm64: don't trash config with compat symbol if COMPAT is disabled
        arm64: assembler: Update comment above cond_yield_neon() macro
        drivers/perf: arm_spe: Don't error on high-order pages for aux buf
        arm64/iommu: handle non-remapped addresses in ->mmap and ->get_sgtable
      54dee406
    • Linus Torvalds's avatar
      Merge tag 'gfs2-5.1.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 651bae98
      Linus Torvalds authored
      Pull gfs2 fix from Andreas Gruenbacher:
       "Fix a gfs2 sign extension bug introduced in v4.3"
      
      * tag 'gfs2-5.1.fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Fix sign extension bug in gfs2_update_stats
      651bae98
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f75b6f30
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Clear up some recent tipc regressions because of registration
          ordering. Fix from Junwei Hu.
      
       2) tipc's TLV_SET() can read past the end of the supplied buffer during
          the copy. From Chris Packham.
      
       3) ptp example program doesn't match the kernel, from Richard Cochran.
      
       4) Outgoing message type fix in qrtr, from Bjorn Andersson.
      
       5) Flow control regression in stmmac, from Tan Tee Min.
      
       6) Fix inband autonegotiation in phylink, from Russell King.
      
       7) Fix sk_bound_dev_if handling in rawv6_bind(), from Mike Manning.
      
       8) Fix usbnet crash after disconnect, from Kloetzke Jan.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits)
        usbnet: fix kernel crash after disconnect
        selftests: fib_rule_tests: use pre-defined DEV_ADDR
        net-next: net: Fix typos in ip-sysctl.txt
        ipv6: Consider sk_bound_dev_if when binding a raw socket to an address
        net: phylink: ensure inband AN works correctly
        usbnet: ipheth: fix racing condition
        net: stmmac: dma channel control register need to be init first
        net: stmmac: fix ethtool flow control not able to get/set
        net: qrtr: Fix message type of outgoing packets
        networking: : fix typos in code comments
        ptp: Fix example program to match kernel.
        fddi: fix typos in code comments
        selftests: fib_rule_tests: enable forwarding before ipv4 from/iif test
        selftests: fib_rule_tests: fix local IPv4 address typo
        tipc: Avoid copying bytes beyond the supplied data
        2/2] net: xilinx_emaclite: use readx_poll_timeout() in mdio wait function
        1/2] net: axienet: use readx_poll_timeout() in mdio wait function
        vlan: Mark expected switch fall-through
        macvlan: Mark expected switch fall-through
        net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query
        ...
      f75b6f30
    • Linus Torvalds's avatar
      Merge tag 'for-5.2/dm-fix-1' of... · 86f9e56d
      Linus Torvalds authored
      Merge tag 'for-5.2/dm-fix-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fix from Mike Snitzer:
       "Fix a particularly glaring oversight in a DM core commit from 5.1 that
        doesn't properly trim special IOs (e.g. discards) relative to
        corresponding target's max_io_len_target_boundary()"
      
      * tag 'for-5.2/dm-fix-1' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm: make sure to obey max_io_len_target_boundary
      86f9e56d
    • Andreas Gruenbacher's avatar
      gfs2: Fix sign extension bug in gfs2_update_stats · 5a5ec83d
      Andreas Gruenbacher authored
      Commit 4d207133 changed the types of the statistic values in struct
      gfs2_lkstats from s64 to u64.  Because of that, what should be a signed
      value in gfs2_update_stats turned into an unsigned value.  When shifted
      right, we end up with a large positive value instead of a small negative
      value, which results in an incorrect variance estimate.
      
      Fixes: 4d207133
      
       ("gfs2: Make statistics unsigned, suitable for use with do_div()")
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Cc: stable@vger.kernel.org # v4.4+
      5a5ec83d
    • Michael Lass's avatar
      dm: make sure to obey max_io_len_target_boundary · 51b86f9a
      Michael Lass authored
      Commit 61697a6a ("dm: eliminate 'split_discard_bios' flag from DM
      target interface") incorrectly removed code from
      __send_changing_extent_only() that is required to impose a per-target IO
      boundary on IO that exceeds max_io_len_target_boundary().  Otherwise
      "special" IO (e.g. DISCARD, WRITE SAME, WRITE ZEROES) can write beyond
      where allowed.
      
      Fix this by restoring the max_io_len_target_boundary() limit in
      __send_changing_extent_only()
      
      Fixes: 61697a6a
      
       ("dm: eliminate 'split_discard_bios' flag from DM target interface")
      Cc: stable@vger.kernel.org # 5.1+
      Signed-off-by: default avatarMichael Lass <bevan@bi-co.net>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      51b86f9a
    • Kloetzke Jan's avatar
      usbnet: fix kernel crash after disconnect · ad70411a
      Kloetzke Jan authored
      
      
      When disconnecting cdc_ncm the kernel sporadically crashes shortly
      after the disconnect:
      
        [   57.868812] Unable to handle kernel NULL pointer dereference at virtual address 00000000
        ...
        [   58.006653] PC is at 0x0
        [   58.009202] LR is at call_timer_fn+0xec/0x1b4
        [   58.013567] pc : [<0000000000000000>] lr : [<ffffff80080f5130>] pstate: 00000145
        [   58.020976] sp : ffffff8008003da0
        [   58.024295] x29: ffffff8008003da0 x28: 0000000000000001
        [   58.029618] x27: 000000000000000a x26: 0000000000000100
        [   58.034941] x25: 0000000000000000 x24: ffffff8008003e68
        [   58.040263] x23: 0000000000000000 x22: 0000000000000000
        [   58.045587] x21: 0000000000000000 x20: ffffffc68fac1808
        [   58.050910] x19: 0000000000000100 x18: 0000000000000000
        [   58.056232] x17: 0000007f885aff8c x16: 0000007f883a9f10
        [   58.061556] x15: 0000000000000001 x14: 000000000000006e
        [   58.066878] x13: 0000000000000000 x12: 00000000000000ba
        [   58.072201] x11: ffffffc69ff1db30 x10: 0000000000000020
        [   58.077524] x9 : 8000100008001000 x8 : 0000000000000001
        [   58.082847] x7 : 0000000000000800 x6 : ffffff8008003e70
        [   58.088169] x5 : ffffffc69ff17a28 x4 : 00000000ffff138b
        [   58.093492] x3 : 0000000000000000 x2 : 0000000000000000
        [   58.098814] x1 : 0000000000000000 x0 : 0000000000000000
        ...
        [   58.205800] [<          (null)>]           (null)
        [   58.210521] [<ffffff80080f5298>] expire_timers+0xa0/0x14c
        [   58.215937] [<ffffff80080f542c>] run_timer_softirq+0xe8/0x128
        [   58.221702] [<ffffff8008081120>] __do_softirq+0x298/0x348
        [   58.227118] [<ffffff80080a6304>] irq_exit+0x74/0xbc
        [   58.232009] [<ffffff80080e17dc>] __handle_domain_irq+0x78/0xac
        [   58.237857] [<ffffff8008080cf4>] gic_handle_irq+0x80/0xac
        ...
      
      The crash happens roughly 125..130ms after the disconnect. This
      correlates with the 'delay' timer that is started on certain USB tx/rx
      errors in the URB completion handler.
      
      The problem is a race of usbnet_stop() with usbnet_start_xmit(). In
      usbnet_stop() we call usbnet_terminate_urbs() to cancel all URBs in
      flight. This only makes sense if no new URBs are submitted
      concurrently, though. But the usbnet_start_xmit() can run at the same
      time on another CPU which almost unconditionally submits an URB. The
      error callback of the new URB will then schedule the timer after it was
      already stopped.
      
      The fix adds a check if the tx queue is stopped after the tx list lock
      has been taken. This should reliably prevent the submission of new URBs
      while usbnet_terminate_urbs() does its job. The same thing is done on
      the rx side even though it might be safe due to other flags that are
      checked there.
      
      Signed-off-by: default avatarJan Klötzke <Jan.Kloetzke@preh.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ad70411a
    • Hangbin Liu's avatar
      selftests: fib_rule_tests: use pre-defined DEV_ADDR · 34632975
      Hangbin Liu authored
      
      
      DEV_ADDR is defined but not used. Use it in address setting.
      Do the same with IPv6 for consistency.
      
      Reported-by: default avatarDavid Ahern <dsahern@gmail.com>
      Fixes: fc82d93e
      
       ("selftests: fib_rule_tests: fix local IPv4 address typo")
      Signed-off-by: default avatarHangbin Liu <liuhangbin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34632975
    • Masanari Iida's avatar
      net-next: net: Fix typos in ip-sysctl.txt · 2bcd9d84
      Masanari Iida authored
      
      
      This patch fixes some spelling typos found in ip-sysctl.txt
      
      Signed-off-by: default avatarMasanari Iida <standby24x7@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2bcd9d84
    • Mike Manning's avatar
      ipv6: Consider sk_bound_dev_if when binding a raw socket to an address · 72f7cfab
      Mike Manning authored
      
      
      IPv6 does not consider if the socket is bound to a device when binding
      to an address. The result is that a socket can be bound to eth0 and
      then bound to the address of eth1. If the device is a VRF, the result
      is that a socket can only be bound to an address in the default VRF.
      
      Resolve by considering the device if sk_bound_dev_if is set.
      
      Signed-off-by: default avatarMike Manning <mmanning@vyatta.att-mail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
      Tested-by: default avatarDavid Ahern <dsahern@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72f7cfab
    • Russell King's avatar
      net: phylink: ensure inband AN works correctly · 406cb0c4
      Russell King authored
      
      
      Do not update the link interface mode while the link is down to avoid
      spurious link interface changes.
      
      Always call mac_config if we have a PHY to propagate the pause mode
      settings to the MAC.
      
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      406cb0c4
    • Bernd Eckstein's avatar
      usbnet: ipheth: fix racing condition · 94d250fa
      Bernd Eckstein authored
      
      
      Fix a racing condition in ipheth.c that can lead to slow performance.
      
      Bug: In ipheth_tx(), netif_wake_queue() may be called on the callback
      ipheth_sndbulk_callback(), _before_ netif_stop_queue() is called.
      When this happens, the queue is stopped longer than it needs to be,
      thus reducing network performance.
      
      Fix: Move netif_stop_queue() in front of usb_submit_urb(). Now the order
      is always correct. In case, usb_submit_urb() fails, the queue is woken up
      again as callback will not fire.
      
      Testing: This racing condition is usually not noticeable, as it has to
      occur very frequently to slowdown the network. The callback from the USB
      is usually triggered slow enough, so the situation does not appear.
      However, on a Ubuntu Linux on VMWare Workstation, running on Windows 10,
      the we loose the race quite often and the following speedup can be noticed:
      
      Without this patch: Download:  4.10 Mbit/s, Upload:  4.01 Mbit/s
      With this patch:    Download: 36.23 Mbit/s, Upload: 17.61 Mbit/s
      
      Signed-off-by: default avatarOliver Zweigle <Oliver.Zweigle@faro.com>
      Signed-off-by: default avatarBernd Eckstein <3ernd.Eckstein@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      94d250fa