1. 25 Aug, 2019 14 commits
  2. 24 Aug, 2019 8 commits
  3. 23 Aug, 2019 17 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 9140d8bd
      Linus Torvalds authored
      Pull rdma fixes from Doug Ledford:
       "No beating around the bush: this is a monster pull request for an -rc5
        kernel. Intel hit me with a series of fixes for TID processing.
        Mellanox hit me with a series for their UMR memory support.
      
        And we had one fix for siw that fixes the 32bit build warnings and
        because of the number of casts that had to be changed to properly
        silence the warnings, that one patch alone is a full 40% of the LOC of
        this entire pull request. Given that this is the initial release
        kernel for siw, I'm trying to fix anything in it that we can, so that
        adds to the impetus to take fixes for it like this one.
      
        I had to do a rebase early in the week. Jason had thought he put a
        patch on the rc queue that he needed to be there so he could base some
        work off of it, and it had actually not been placed there. So he asked
        me (on Tuesday) to fix that up before pushing my wip branch to the
        official rc branch. I did, and that's why the early patches look like
        they were all committed at the same time on Tuesday. That bunch had
        been in my queue prior.
      
        The various patches all pass my test for being legitimate fixes and
        not attempts to slide new features or development into a late rc.
        Well, they were all fixes with the exception of a couple clean up
        patches people wrote for making the fixes they also wrote better (like
        a cleanup patch to move UMR checking into a function so that the
        remaining UMR fix patches can reference that function), so I left
        those in place too.
      
        My apologies for the LOC count and the number of patches here, it's
        just how the cards fell this cycle.
      
        Summary:
      
         - Fix siw buffer mapping issue
      
         - Fix siw 32/64 casting issues
      
         - Fix a KASAN access issue in bnxt_re
      
         - Fix several memory leaks (hfi1, mlx4)
      
         - Fix a NULL deref in cma_cleanup
      
         - Fixes for UMR memory support in mlx5 (4 patch series)
      
         - Fix namespace check for restrack
      
         - Fixes for counter support
      
         - Fixes for hfi1 TID processing (5 patch series)
      
         - Fix potential NULL deref in siw
      
         - Fix memory page calculations in mlx5"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (21 commits)
        RDMA/siw: Fix 64/32bit pointer inconsistency
        RDMA/siw: Fix SGL mapping issues
        RDMA/bnxt_re: Fix stack-out-of-bounds in bnxt_qplib_rcfw_send_message
        infiniband: hfi1: fix memory leaks
        infiniband: hfi1: fix a memory leak bug
        IB/mlx4: Fix memory leaks
        RDMA/cma: fix null-ptr-deref Read in cma_cleanup
        IB/mlx5: Block MR WR if UMR is not possible
        IB/mlx5: Fix MR re-registration flow to use UMR properly
        IB/mlx5: Report and handle ODP support properly
        IB/mlx5: Consolidate use_umr checks into single function
        RDMA/restrack: Rewrite PID namespace check to be reliable
        RDMA/counters: Properly implement PID checks
        IB/core: Fix NULL pointer dereference when bind QP to counter
        IB/hfi1: Drop stale TID RDMA packets that cause TIDErr
        IB/hfi1: Add additional checks when handling TID RDMA WRITE DATA packet
        IB/hfi1: Add additional checks when handling TID RDMA READ RESP packet
        IB/hfi1: Unsafe PSN checking for TID RDMA READ Resp packet
        IB/hfi1: Drop stale TID RDMA packets
        RDMA/siw: Fix potential NULL de-ref
        ...
      9140d8bd
    • Linus Torvalds's avatar
      Merge tag 'for-linus-20190823' of git://git.kernel.dk/linux-block · b9bd6806
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Here's a set of fixes that should go into this release. This contains:
      
         - Three minor fixes for NVMe.
      
         - Three minor tweaks for the io_uring polling logic.
      
         - Officially mark Song as the MD maintainer, after he's been filling
           that role sucessfully for the last 6 months or so"
      
      * tag 'for-linus-20190823' of git://git.kernel.dk/linux-block:
        io_uring: add need_resched() check in inner poll loop
        md: update MAINTAINERS info
        io_uring: don't enter poll loop if we have CQEs pending
        nvme: Add quirk for LiteON CL1 devices running FW 22301111
        nvme: Fix cntlid validation when not using NVMEoF
        nvme-multipath: fix possible I/O hang when paths are updated
        io_uring: fix potential hang with polled IO
      b9bd6806
    • Linus Torvalds's avatar
      Merge tag 'for-5.3/dm-fixes-2' of... · dd469a45
      Linus Torvalds authored
      Merge tag 'for-5.3/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - Revert a DM bufio change from during the 5.3 merge window now that a
         proper fix has been made to the block loopback driver.
      
       - Fix DM kcopyd to wakeup so failed subjobs get completed.
      
       - Various fixes to DM zoned target to address error handling, and other
         small tweaks (SPDX license identifiers and fix typos).
      
       - Fix DM integrity range locking race by tracking whether journal has
         changed.
      
       - Fix DM dust target to detect reads of badblocks beyond the first 512b
         sector (applicable if blocksize is larger than 512b).
      
       - Fix DM persistent-data issue in both the DM btree and DM
         space-map-metadata interfaces.
      
       - Fix out of bounds memory access with certain DM table configurations.
      
      * tag 'for-5.3/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm table: fix invalid memory accesses with too high sector number
        dm space map metadata: fix missing store of apply_bops() return value
        dm btree: fix order of block initialization in btree_split_beneath
        dm raid: add missing cleanup in raid_ctr()
        dm zoned: fix potential NULL dereference in dmz_do_reclaim()
        dm dust: use dust block size for badblocklist index
        dm integrity: fix a crash due to BUG_ON in __journal_read_write()
        dm zoned: fix a few typos
        dm zoned: add SPDX license identifiers
        dm zoned: properly handle backing device failure
        dm zoned: improve error handling in i/o map code
        dm zoned: improve error handling in reclaim
        dm kcopyd: always complete failed jobs
        Revert "dm bufio: fix deadlock with loop device"
      dd469a45
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.3-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · f576518c
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
       "Here are a few more bug fixes that trickled in since the last pull.
        They've survived the usual xfstests runs and merge cleanly with this
        morning's master.
      
        I expect there to be one more pull request tomorrow for the fix to
        that quota related inode unlock bug that we were reviewing last night,
        but it will continue to soak in the testing machine for several more
        hours.
      
         - Fix missing compat ioctl handling for get/setlabel
      
         - Fix missing ioctl pointer sanitization on s390
      
         - Fix a page locking deadlock in the dedupe comparison code
      
         - Fix inadequate locking in reflink code w.r.t. concurrent directio
      
         - Fix broken error detection when breaking layouts"
      
      * tag 'xfs-5.3-fixes-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        fs/xfs: Fix return code of xfs_break_leased_layouts()
        xfs: fix reflink source file racing with directio writes
        vfs: fix page locking deadlocks when deduping files
        xfs: compat_ioctl: use compat_ptr()
        xfs: fall back to native ioctls for unhandled compat ones
      f576518c
    • Andre Przywara's avatar
      KVM: arm/arm64: VGIC: Properly initialise private IRQ affinity · 2e16f3e9
      Andre Przywara authored
      At the moment we initialise the target *mask* of a virtual IRQ to the
      VCPU it belongs to, even though this mask is only defined for GICv2 and
      quickly runs out of bits for many GICv3 guests.
      This behaviour triggers an UBSAN complaint for more than 32 VCPUs:
      ------
      [ 5659.462377] UBSAN: Undefined behaviour in virt/kvm/arm/vgic/vgic-init.c:223:21
      [ 5659.471689] shift exponent 32 is too large for 32-bit type 'unsigned int'
      ------
      Also for GICv3 guests the reporting of TARGET in the "vgic-state" debugfs
      dump is wrong, due to this very same problem.
      
      Because there is no requirement to create the VGIC device before the
      VCPUs (and QEMU actually does it the other way round), we can't safely
      initialise mpidr or targets in kvm_vgic_vcpu_init(). But since we touch
      every private IRQ for each VCPU anyway later (in vgic_init()), we can
      just move the initialisation of those fields into there, where we
      definitely know the VGIC type.
      
      On the way make sure we really have either a VGICv2 or a VGICv3 device,
      since the existing code is just checking for "VGICv3 or not", silently
      ignoring the uninitialised case.
      Signed-off-by: default avatarAndre Przywara <andre.przywara@arm.com>
      Reported-by: default avatarDave Martin <dave.martin@arm.com>
      Tested-by: default avatarJulien Grall <julien.grall@arm.com>
      Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
      2e16f3e9
    • Linus Torvalds's avatar
      Merge tag 'modules-for-v5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux · e3fb13b7
      Linus Torvalds authored
      Pull modules fixes from Jessica Yu:
       "Fix BUG_ON() being triggered in frob_text() due to non-page-aligned
        module sections"
      
      * tag 'modules-for-v5.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
        modules: page-align module section allocations only for arches supporting strict module rwx
        modules: always page-align module section allocations
      e3fb13b7
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.3-rc6' of git://github.com/ceph/ceph-client · 4e563944
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "Three important fixes tagged for stable (an indefinite hang, a crash
        on an assert and a NULL pointer dereference) plus a small series from
        Luis fixing instances of vfree() under spinlock"
      
      * tag 'ceph-for-5.3-rc6' of git://github.com/ceph/ceph-client:
        libceph: fix PG split vs OSD (re)connect race
        ceph: don't try fill file_lock on unsuccessful GETFILELOCK reply
        ceph: clear page dirty before invalidate page
        ceph: fix buffer free while holding i_ceph_lock in fill_inode()
        ceph: fix buffer free while holding i_ceph_lock in __ceph_build_xattrs_blob()
        ceph: fix buffer free while holding i_ceph_lock in __ceph_setxattr()
        libceph: allow ceph_buffer_put() to receive a NULL ceph_buffer
      4e563944
    • Bernard Metzler's avatar
      RDMA/siw: Fix 64/32bit pointer inconsistency · c536277e
      Bernard Metzler authored
      Fixes improper casting between addresses and unsigned types.
      Changes siw_pbl_get_buffer() function to return appropriate
      dma_addr_t, and not u64.
      
      Also fixes debug prints. Now any potentially kernel private
      pointers are printed formatted as '%pK', to allow keeping that
      information secret.
      
      Fixes: d941bfe500be ("RDMA/siw: Change CQ flags from 64->32 bits")
      Fixes: b0fff731 ("rdma/siw: completion queue methods")
      Fixes: 8b6a361b ("rdma/siw: receive path")
      Fixes: b9be6f18 ("rdma/siw: transmit path")
      Fixes: f29dd55b ("rdma/siw: queue pair methods")
      Fixes: 2251334d ("rdma/siw: application buffer management")
      Fixes: 303ae1cd ("rdma/siw: application interface")
      Fixes: 6c52fdc2 ("rdma/siw: connection management")
      Fixes: a5319752 ("rdma/siw: main include file")
      Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reported-by: default avatarJason Gunthorpe <jgg@ziepe.ca>
      Reported-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
      Link: https://lore.kernel.org/r/20190822173738.26817-1-bmt@zurich.ibm.comSigned-off-by: default avatarDoug Ledford <dledford@redhat.com>
      c536277e
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2019-08-23' of git://anongit.freedesktop.org/drm/drm · 1374a22e
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Live from the laundromat after my washing machine broke down, we have
        the 5.3-rc6 fixes. Changelog is in the tag below, but nothing too
        noteworthy in here:
      
        rcar-du:
         - LVDS dual-link mode fix
      
        mediatek:
         - of node refcount fix
         - prime buffer import fix
         - dma max seg fix
      
        komeda:
         - output polling fix
         - abfc format fix
         - memory-region DT fix
      
        amdgpu:
         - bpc display fix
         - ioctl memory leak fix
         - gfxoff fix
         - smu warnings fix
      
        i915:
         - HDMI mode readout fix"
      
      * tag 'drm-fixes-2019-08-23' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable
        drm/amd/display: Calculate bpc based on max_requested_bpc
        drm/amdgpu: prevent memory leaks in AMDGPU_CS ioctl
        drm/amd/amdgpu: disable MMHUB PG for navi10
        drm/amd/powerplay: remove duplicate macro smu_get_uclk_dpm_states in amdgpu_smu.h
        drm/amd/powerplay: fix variable type errors in smu_v11_0_setup_pptable
        drm/amdgpu/gfx9: update pg_flags after determining if gfx off is possible
        drm/i915: Fix HW readout for crtc_clock in HDMI mode
        drm/mediatek: mtk_drm_drv.c: Add of_node_put() before goto
        drm: rcar_lvds: Fix dual link mode operations
        drm/mediatek: set DMA max segment size
        drm/mediatek: use correct device to import PRIME buffers
        drm/omap: ensure we have a valid dma_mask
        drm/komeda: Add support for 'memory-region' DT node property
        drm/komeda: Adds internal bpp computing for arm afbc only format YU08 YU10
        drm/komeda: Initialize and enable output polling on Komeda
      1374a22e
    • Mikulas Patocka's avatar
      dm table: fix invalid memory accesses with too high sector number · 1cfd5d33
      Mikulas Patocka authored
      If the sector number is too high, dm_table_find_target() should return a
      pointer to a zeroed dm_target structure (the caller should test it with
      dm_target_is_valid).
      
      However, for some table sizes, the code in dm_table_find_target() that
      performs btree lookup will access out of bound memory structures.
      
      Fix this bug by testing the sector number at the beginning of
      dm_table_find_target(). Also, add an "inline" keyword to the function
      dm_table_get_size() because this is a hot path.
      
      Fixes: 512875bd ("dm: table detect io beyond device")
      Cc: stable@vger.kernel.org
      Reported-by: default avatarZhang Tao <kontais@zoho.com>
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
      1cfd5d33
    • Linus Walleij's avatar
      gpio: Fix irqchip initialization order · 48057ed1
      Linus Walleij authored
      The new API for registering a gpio_irq_chip along with a
      gpio_chip has a different semantic ordering than the old
      API which added the irqchip explicitly after registering
      the gpio_chip.
      
      Move the calls to add the gpio_irq_chip *last* in the
      function, so that the different hooks setting up OF and
      ACPI and machine gpio_chips are called *before* we try
      to register the interrupts, preserving the elder semantic
      order.
      
      This cropped up in the PL061 driver which used to work
      fine with no special ACPI quirks, but started to misbehave
      using the new API.
      
      Fixes: e0d89728 ("gpio: Implement tighter IRQ chip integration")
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
      Reported-by: default avatarWei Xu <xuwei5@hisilicon.com>
      Tested-by: default avatarWei Xu <xuwei5@hisilicon.com>
      Reported-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Link: https://lore.kernel.org/r/20190820080527.11796-1-linus.walleij@linaro.org
      48057ed1
    • Darrick J. Wong's avatar
      xfs: fix missing ILOCK unlock when xfs_setattr_nonsize fails due to EDQUOT · 1fb254aa
      Darrick J. Wong authored
      Benjamin Moody reported to Debian that XFS partially wedges when a chgrp
      fails on account of being out of disk quota.  I ran his reproducer
      script:
      
      # adduser dummy
      # adduser dummy plugdev
      
      # dd if=/dev/zero bs=1M count=100 of=test.img
      # mkfs.xfs test.img
      # mount -t xfs -o gquota test.img /mnt
      # mkdir -p /mnt/dummy
      # chown -c dummy /mnt/dummy
      # xfs_quota -xc 'limit -g bsoft=100k bhard=100k plugdev' /mnt
      
      (and then as user dummy)
      
      $ dd if=/dev/urandom bs=1M count=50 of=/mnt/dummy/foo
      $ chgrp plugdev /mnt/dummy/foo
      
      and saw:
      
      ================================================
      WARNING: lock held when returning to user space!
      5.3.0-rc5 #rc5 Tainted: G        W
      ------------------------------------------------
      chgrp/47006 is leaving the kernel with locks still held!
      1 lock held by chgrp/47006:
       #0: 000000006664ea2d (&xfs_nondir_ilock_class){++++}, at: xfs_ilock+0xd2/0x290 [xfs]
      
      ...which is clearly caused by xfs_setattr_nonsize failing to unlock the
      ILOCK after the xfs_qm_vop_chown_reserve call fails.  Add the missing
      unlock.
      
      Reported-by: benjamin.moody@gmail.com
      Fixes: 253f4911 ("xfs: better xfs_trans_alloc interface")
      Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
      Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
      Tested-by: default avatarSalvatore Bonaccorso <carnil@debian.org>
      1fb254aa
    • Dave Airlie's avatar
    • Lyude Paul's avatar
      drm/nouveau: Don't retry infinitely when receiving no data on i2c over AUX · c358ebf5
      Lyude Paul authored
      While I had thought I had fixed this issue in:
      
      commit 342406e4 ("drm/nouveau/i2c: Disable i2c bus access after
      ->fini()")
      
      It turns out that while I did fix the error messages I was seeing on my
      P50 when trying to access i2c busses with the GPU in runtime suspend, I
      accidentally had missed one important detail that was mentioned on the
      bug report this commit was supposed to fix: that the CPU would only lock
      up when trying to access i2c busses _on connected devices_ _while the
      GPU is not in runtime suspend_. Whoops. That definitely explains why I
      was not able to get my machine to hang with i2c bus interactions until
      now, as plugging my P50 into it's dock with an HDMI monitor connected
      allowed me to finally reproduce this locally.
      
      Now that I have managed to reproduce this issue properly, it looks like
      the problem is much simpler then it looks. It turns out that some
      connected devices, such as MST laptop docks, will actually ACK i2c reads
      even if no data was actually read:
      
      [  275.063043] nouveau 0000:01:00.0: i2c: aux 000a: 1: 0000004c 1
      [  275.063447] nouveau 0000:01:00.0: i2c: aux 000a: 00 01101000 10040000
      [  275.063759] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000001
      [  275.064024] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000
      [  275.064285] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000
      [  275.064594] nouveau 0000:01:00.0: i2c: aux 000a: rd 00000000
      
      Because we don't handle the situation of i2c ack without any data, we
      end up entering an infinite loop in nvkm_i2c_aux_i2c_xfer() since the
      value of cnt always remains at 0. This finally properly explains how
      this could result in a CPU hang like the ones observed in the
      aforementioned commit.
      
      So, fix this by retrying transactions if no data is written or received,
      and give up and fail the transaction if we continue to not write or
      receive any data after 32 retries.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
      c358ebf5
    • Alex Deucher's avatar
      drm/amdgpu/powerplay: silence a warning in smu_v11_0_setup_pptable · 75710f08
      Alex Deucher authored
      I think gcc is confused as I don't see how size could be used
      unitialized, but go ahead and silence the warning.
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190822032527.1376-1-alexander.deucher@amd.com
      75710f08
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2019-08-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · cf3627fb
      Dave Airlie authored
      Fixes for v5.3-rc6:
      - dma fix for omap.
      - Make output polling work on komeda.
      - Fix bpp computing for AFBC formats in komeda.
      - Support the memory-region property in komeda.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/5f1fdfe3-814e-fad1-663c-7279217fc085@linux.intel.com
      cf3627fb
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2019-08-22' of... · dd89c112
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2019-08-22' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.3-rc6:
      - fix hardware state readout for 10 bpc HDMI
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87sgptd114.fsf@intel.com
      dd89c112
  4. 22 Aug, 2019 1 commit