Skip to content
  1. Sep 29, 2018
    • Greg Kroah-Hartman's avatar
      Merge tag 'dma-mapping-4.19-3' of git://git.infradead.org/users/hch/dma-mapping · 7a6878bb
      Greg Kroah-Hartman authored
      Christoph writes:
        "dma mapping fix for 4.19-rc6
      
         fix a missing Kconfig symbol for commits introduced in 4.19-rc"
      
      * tag 'dma-mapping-4.19-3' of git://git.infradead.org/users/hch/dma-mapping:
        dma-mapping: add the missing ARCH_HAS_SYNC_DMA_FOR_CPU_ALL declaration
      7a6878bb
    • Greg Kroah-Hartman's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · e704966c
      Greg Kroah-Hartman authored
      Dmitry writes:
        "Input updates for v4.19-rc5
      
         Just a few driver fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: uinput - allow for max == min during input_absinfo validation
        Input: elantech - enable middle button of touchpad on ThinkPad P72
        Input: atakbd - fix Atari CapsLock behaviour
        Input: atakbd - fix Atari keymap
        Input: egalax_ts - add system wakeup support
        Input: gpio-keys - fix a documentation index issue
      e704966c
    • Greg Kroah-Hartman's avatar
      Merge tag 'spi-fix-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 2f19e7a7
      Greg Kroah-Hartman authored
      Mark writes:
        "spi: Fixes for v4.19
      
         Quite a few fixes for the Renesas drivers in here, plus a fix for the
         Tegra driver and some documentation fixes for the recently added
         spi-mem code.  The Tegra fix is relatively large but fairly
         straightforward and mechanical, it runs on probe so it's been
         reasonably well covered in -next testing."
      
      * tag 'spi-fix-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: spi-mem: Move the DMA-able constraint doc to the kerneldoc header
        spi: spi-mem: Add missing description for data.nbytes field
        spi: rspi: Fix interrupted DMA transfers
        spi: rspi: Fix invalid SPI use during system suspend
        spi: sh-msiof: Fix handling of write value for SISTR register
        spi: sh-msiof: Fix invalid SPI use during system suspend
        spi: gpio: Fix copy-and-paste error
        spi: tegra20-slink: explicitly enable/disable clock
      2f19e7a7
    • Greg Kroah-Hartman's avatar
      Merge tag 'regulator-v4.19-rc5' of... · 8f056611
      Greg Kroah-Hartman authored
      Merge tag 'regulator-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Mark writes:
        "regulator: Fixes for 4.19
      
         A collection of fairly minor bug fixes here, a couple of driver
         specific ones plus two core fixes.  There's one fix for the new
         suspend state code which fixes some confusion with constant values
         that are supposed to indicate noop operation and another fixing a
         race condition with the creation of sysfs files on new regulators."
      
      * tag 'regulator-v4.19-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: fix crash caused by null driver data
        regulator: Fix 'do-nothing' value for regulators without suspend state
        regulator: da9063: fix DT probing with constraints
        regulator: bd71837: Disable voltage monitoring for LDO3/4
      8f056611
    • Greg Kroah-Hartman's avatar
      Merge tag 'powerpc-4.19-3' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · f005de01
      Greg Kroah-Hartman authored
      Michael writes:
        "powerpc fixes for 4.19 #3
      
         A reasonably big batch of fixes due to me being away for a few weeks.
      
         A fix for the TM emulation support on Power9, which could result in
         corrupting the guest r11 when running under KVM.
      
         Two fixes to the TM code which could lead to userspace GPR corruption
         if we take an SLB miss at exactly the wrong time.
      
         Our dynamic patching code had a bug that meant we could patch freed
         __init text, which could lead to corrupting userspace memory.
      
         csum_ipv6_magic() didn't work on little endian platforms since we
         optimised it recently.
      
         A fix for an endian bug when reading a device tree property telling
         us how many storage keys the machine has available.
      
         Fix a crash seen on some configurations of PowerVM when migrating the
         partition from one machine to another.
      
         A fix for a regression in the setup of our CPU to NUMA node mapping
         in KVM guests.
      
         A fix to our selftest Makefiles to make them work since a recent
         change to the shared Makefile logic."
      
      * tag 'powerpc-4.19-3' of https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        selftests/powerpc: Fix Makefiles for headers_install change
        powerpc/numa: Use associativity if VPHN hcall is successful
        powerpc/tm: Avoid possible userspace r1 corruption on reclaim
        powerpc/tm: Fix userspace r13 corruption
        powerpc/pseries: Fix unitialized timer reset on migration
        powerpc/pkeys: Fix reading of ibm, processor-storage-keys property
        powerpc: fix csum_ipv6_magic() on little endian platforms
        powerpc/powernv/ioda2: Reduce upper limit for DMA window size (again)
        powerpc: Avoid code patching freed init sections
        KVM: PPC: Book3S HV: Fix guest r11 corruption with POWER9 TM workarounds
      f005de01
    • Greg Kroah-Hartman's avatar
      Merge tag 'pinctrl-v4.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 900915f9
      Greg Kroah-Hartman authored
      Linus writes:
        "Pin control fixes for v4.19:
         - Fixes to x86 hardware:
         - AMD interrupt debounce issues
         - Faulty Intel cannonlake register offset
         - Revert pin translation IRQ locking"
      
      * tag 'pinctrl-v4.19-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        Revert "pinctrl: intel: Do pin translation when lock IRQ"
        pinctrl: cannonlake: Fix HOSTSW_OWN register offset of H variant
        pinctrl/amd: poll InterruptEnable bits in amd_gpio_irq_set_type
      900915f9
    • Greg Kroah-Hartman's avatar
      Merge tag 'drm-fixes-2018-09-28' of git://anongit.freedesktop.org/drm/drm · f151f57b
      Greg Kroah-Hartman authored
      Dave writes:
        "drm fixes for 4.19-rc6
      
         Looks like a pretty normal week for graphics,
      
         core: syncobj fix, panel link regression revert
         amd: suspend/resume fixes, EDID emulation fix
         mali-dp: NV12 writeback and vblank reset fixes
         etnaviv: DMA setup fix"
      
      * tag 'drm-fixes-2018-09-28' of git://anongit.freedesktop.org/drm/drm:
        drm/amd/display: Fix Edid emulation for linux
        drm/amd/display: Fix Vega10 lightup on S3 resume
        drm/amdgpu: Fix vce work queue was not cancelled when suspend
        Revert "drm/panel: Add device_link from panel device to DRM device"
        drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set
        drm/malidp: Fix writeback in NV12
        drm: mali-dp: Call drm_crtc_vblank_reset on device init
        drm/etnaviv: add DMA configuration for etnaviv platform device
      f151f57b
    • Greg Kroah-Hartman's avatar
      Merge tag 'riscv-for-linus-4.19-rc6' of... · ed1b3f4c
      Greg Kroah-Hartman authored
      Merge tag 'riscv-for-linus-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux
      
      Palmer writes:
        "A Single RISC-V Update for 4.19-rc6
      
         The Debian guys have been pushing on our port and found some
         unversioned symbols leaking into modules.  This PR contains a single
         fix for that issue."
      
      * tag 'riscv-for-linus-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
        RISC-V: include linux/ftrace.h in asm-prototypes.h
      ed1b3f4c
    • Greg Kroah-Hartman's avatar
      Merge tag 'pci-v4.19-fixes-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 278e59a0
      Greg Kroah-Hartman authored
      Bjorn writes:
        "PCI fixes:
      
        - Fix ACPI hotplug issue that causes black screen crash at boot (Mika
          Westerberg)
      
        - Fix DesignWare "scheduling while atomic" issues (Jisheng Zhang)
      
        - Add PPC contacts to MAINTAINERS for PCI core error handling (Bjorn
          Helgaas)
      
        - Sort Mobiveil MAINTAINERS entry (Lorenzo Pieralisi)"
      
      * tag 'pci-v4.19-fixes-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        ACPI / hotplug / PCI: Don't scan for non-hotplug bridges if slot is not bridge
        PCI: dwc: Fix scheduling while atomic issues
        MAINTAINERS: Move mobiveil PCI driver entry where it belongs
        MAINTAINERS: Update PPC contacts for PCI core error handling
      278e59a0
  2. Sep 28, 2018
    • Michael Ellerman's avatar
      selftests/powerpc: Fix Makefiles for headers_install change · 7e0cf1c9
      Michael Ellerman authored
      Commit b2d35fa5 ("selftests: add headers_install to lib.mk")
      introduced a requirement that Makefiles more than one level below the
      selftests directory need to define top_srcdir, but it didn't update
      any of the powerpc Makefiles.
      
      This broke building all the powerpc selftests with eg:
      
        make[1]: Entering directory '/src/linux/tools/testing/selftests/powerpc'
        BUILD_TARGET=/src/linux/tools/testing/selftests/powerpc/alignment; mkdir -p $BUILD_TARGET; make OUTPUT=$BUILD_TARGET -k -C alignment all
        make[2]: Entering directory '/src/linux/tools/testing/selftests/powerpc/alignment'
        ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory
        make[2]: *** No rule to make target '../../../../scripts/subarch.include'.
        make[2]: Failed to remake makefile '../../../../scripts/subarch.include'.
        Makefile:38: recipe for target 'alignment' failed
      
      Fix it by setting top_srcdir in the affected Makefiles.
      
      Fixes: b2d35fa5
      
       ("selftests: add headers_install to lib.mk")
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      7e0cf1c9
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-4.19' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · fcb1349a
      Dave Airlie authored
      
      
      Just a few fixes for 4.19:
      - Couple of suspend/resume fixes
      - Fix EDID emulation with DC
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexdeucher@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180927155418.2813-1-alexander.deucher@amd.com
      fcb1349a
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2018-09-27-1' of... · adba0e54
      Dave Airlie authored
      
      Merge tag 'drm-misc-fixes-2018-09-27-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
      
      - Revert adding device-link to panels
      - Don't leak fences in drm/syncobj
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Sean Paul <sean@poorly.run>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180927152712.GA53076@art_vandelay
      adba0e54
    • Greg Kroah-Hartman's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · ad037148
      Greg Kroah-Hartman authored
      Jason writes:
        "Second RDMA rc pull request
      
         - Fix a long standing race bug when destroying comp_event file descriptors
      
         - srp, hfi1, bnxt_re: Various driver crashes from missing validation
           and other cases
      
         - Fixes for regressions in patches merged this window in the gid
           cache, devx, ucma and uapi."
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/core: Set right entry state before releasing reference
        IB/mlx5: Destroy the DEVX object upon error flow
        IB/uverbs: Free uapi on destroy
        RDMA/bnxt_re: Fix system crash during RDMA resource initialization
        IB/hfi1: Fix destroy_qp hang after a link down
        IB/hfi1: Fix context recovery when PBC has an UnsupportedVL
        IB/hfi1: Invalid user input can result in crash
        IB/hfi1: Fix SL array bounds check
        RDMA/uverbs: Fix validity check for modify QP
        IB/srp: Avoid that sg_reset -d ${srp_device} triggers an infinite loop
        ucma: fix a use-after-free in ucma_resolve_ip()
        RDMA/uverbs: Atomically flush and mark closed the comp event queue
        cxgb4: fix abort_req_rss6 struct
      ad037148
    • Greg Kroah-Hartman's avatar
      Merge tag 'for_v4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · c127e59b
      Greg Kroah-Hartman authored
      Jan writes:
        "an ext2 patch fixing fsync(2) for DAX mounts."
      
      * tag 'for_v4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        ext2, dax: set ext2_dax_aops for dax files
      c127e59b
  3. Sep 27, 2018
  4. Sep 26, 2018
    • Jason Ekstrand's avatar
      drm/syncobj: Don't leak fences when WAIT_FOR_SUBMIT is set · 337fe9f5
      Jason Ekstrand authored
      
      
      We attempt to get fences earlier in the hopes that everything will
      already have fences and no callbacks will be needed.  If we do succeed
      in getting a fence, getting one a second time will result in a duplicate
      ref with no unref.  This is causing memory leaks in Vulkan applications
      that create a lot of fences; playing for a few hours can, apparently,
      bring down the system.
      
      Cc: stable@vger.kernel.org
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107899
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarJason Ekstrand <jason@jlekstrand.net>
      Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180926071703.15257-1-jason.ekstrand@intel.com
      337fe9f5
    • Greg Kroah-Hartman's avatar
      Merge tag 'iommu-fixes-v4.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · c307aaf3
      Greg Kroah-Hartman authored
      Joerg writes:
        "IOMMU Fixes for Linux v4.19-rc5
      
         Three fixes queued up:
      
      	- Warning fix for Rockchip IOMMU where there were IRQ handlers
      	  for offlined hardware.
      
      	- Fix for Intel VT-d because recent changes caused boot failures
      	  on some machines because it tried to allocate to much
      	  contiguous memory.
      
      	- Fix for AMD IOMMU to handle eMMC devices correctly that appear
      	  as ACPI HID devices."
      
      * tag 'iommu-fixes-v4.19-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Return devid as alias for ACPI HID devices
        iommu/vt-d: Handle memory shortage on pasid table allocation
        iommu/rockchip: Free irqs in shutdown handler
      c307aaf3
    • Arindam Nath's avatar
      iommu/amd: Return devid as alias for ACPI HID devices · 5ebb1bc2
      Arindam Nath authored
      
      
      ACPI HID devices do not actually have an alias for
      them in the IVRS. But dev_data->alias is still used
      for indexing into the IOMMU device table for devices
      being handled by the IOMMU. So for ACPI HID devices,
      we simply return the corresponding devid as an alias,
      as parsed from IVRS table.
      
      Signed-off-by: default avatarArindam Nath <arindam.nath@amd.com>
      Fixes: 2bf9a0a1
      
       ('iommu/amd: Add iommu support for ACPI HID devices')
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      5ebb1bc2
    • Christoph Hellwig's avatar
      dma-mapping: add the missing ARCH_HAS_SYNC_DMA_FOR_CPU_ALL declaration · 974c24c5
      Christoph Hellwig authored
      The patch adding the infrastructure failed to actually add the symbol
      declaration, oops..
      
      Fixes: faef8772
      
       ("dma-noncoherent: add a arch_sync_dma_for_cpu_all hook")
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarPaul Burton <paul.burton@mips.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      974c24c5
    • Parav Pandit's avatar
      RDMA/core: Set right entry state before releasing reference · 5c5702e2
      Parav Pandit authored
      Currently add_modify_gid() for IB link layer has followong issue
      in cache update path.
      
      When GID update event occurs, core releases reference to the GID
      table without updating its state and/or entry pointer.
      
      CPU-0                              CPU-1
      ------                             -----
      ib_cache_update()                    IPoIB ULP
         add_modify_gid()                   [..]
            put_gid_entry()
            refcnt = 0, but
            state = valid,
            entry is valid.
            (work item is not yet executed).
                                         ipoib_create_ah()
                                           rdma_create_ah()
                                              rdma_get_gid_attr() <--
                                         	Tries to acquire gid_attr
                                              which has refcnt = 0.
                                         	This is incorrect.
      
      GID entry state and entry pointer is provides the accurate GID enty
      state. Such fields must be updated with rwlock to protect against
      readers and, such fields must be in sane state before refcount can drop
      to zero. Otherwise above race condition can happen leading to
      use-after-free situation.
      
      Following backtrace has been observed when cache update for an IB port
      is triggered while IPoIB ULP is creating an AH.
      
      Therefore, when updating GID entry, first mark a valid entry as invalid
      through state and set the barrier so that no callers can acquired
      the GID entry, followed by release reference to it.
      
      refcount_t: increment on 0; use-after-free.
      WARNING: CPU: 4 PID: 29106 at lib/refcount.c:153 refcount_inc_checked+0x30/0x50
      Workqueue: ib-comp-unb-wq ib_cq_poll_work [ib_core]
      RIP: 0010:refcount_inc_checked+0x30/0x50
      RSP: 0018:ffff8802ad36f600 EFLAGS: 00010082
      RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
      RDX: 0000000000000002 RSI: 0000000000000008 RDI: ffffffff86710100
      RBP: ffff8802d6e60a30 R08: ffffed005d67bf8b R09: ffffed005d67bf8b
      R10: 0000000000000001 R11: ffffed005d67bf8a R12: ffff88027620cee8
      R13: ffff8802d6e60988 R14: ffff8802d6e60a78 R15: 0000000000000202
      FS: 0000000000000000(0000) GS:ffff8802eb200000(0000) knlGS:0000000000000000
      CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007f3ab35e5c88 CR3: 00000002ce84a000 CR4: 00000000000006e0
      IPv6: ADDRCONF(NETDEV_CHANGE): ib1: link becomes ready
      Call Trace:
      rdma_get_gid_attr+0x220/0x310 [ib_core]
      ? lock_acquire+0x145/0x3a0
      rdma_fill_sgid_attr+0x32c/0x470 [ib_core]
      rdma_create_ah+0x89/0x160 [ib_core]
      ? rdma_fill_sgid_attr+0x470/0x470 [ib_core]
      ? ipoib_create_ah+0x52/0x260 [ib_ipoib]
      ipoib_create_ah+0xf5/0x260 [ib_ipoib]
      ipoib_mcast_join_complete+0xbbe/0x2540 [ib_ipoib]
      
      Fixes: b150c386
      
       ("IB/core: Introduce GID entry reference counts")
      Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      5c5702e2
    • Yishai Hadas's avatar
      IB/mlx5: Destroy the DEVX object upon error flow · e8ef090a
      Yishai Hadas authored
      Upon DEVX object creation the object must be destroyed upon a follows
      error flow.
      
      Fixes: 7efce369
      
       ("IB/mlx5: Add obj create and destroy functionality")
      Signed-off-by: default avatarYishai Hadas <yishaih@mellanox.com>
      Reviewed-by: default avatarArtemy Kovalyov <artemyko@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      e8ef090a
    • Mark Bloch's avatar
      IB/uverbs: Free uapi on destroy · a9360abd
      Mark Bloch authored
      Make sure we free struct uverbs_api once we clean the radix tree. It was
      allocated by uverbs_alloc_api().
      
      Fixes: 9ed3e5f4
      
       ("IB/uverbs: Build the specs into a radix tree at runtime")
      Reported-by: default avatarBart Van Assche <bvanassche@acm.org>
      Signed-off-by: default avatarMark Bloch <markb@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a9360abd
    • Greg Kroah-Hartman's avatar
      erge tag 'libnvdimm-fixes-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · a3852318
      Greg Kroah-Hartman authored
      Dan writes:
        "libnvdimm/dax for 4.19-rc6
      
        * (2) fixes for the dax error handling updates that were merged for
        v4.19-rc1. My mails to Al have been bouncing recently, so I do not have
        his ack but the uaccess change is of the trivial / obviously correct
        variety. The address_space_operations fixes a regression.
      
        * A filesystem-dax fix to correct the zero page lookup to be compatible
         with non-x86 (mips and s390) architectures."
      
      * tag 'libnvdimm-fixes-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        device-dax: Add missing address_space_operations
        uaccess: Fix is_source param for check_copy_size() in copy_to_iter_mcsafe()
        filesystem-dax: Fix use of zero page
      a3852318
    • Greg Kroah-Hartman's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 846e8dd4
      Greg Kroah-Hartman authored
      James writes:
        "SCSI fixes on 20180925
      
         Nine obvious bug fixes mostly in individual drivers.  The target fix
         is of particular importance because it's CVE related."
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: sd: don't crash the host on invalid commands
        scsi: ipr: System hung while dlpar adding primary ipr adapter back
        scsi: target: iscsi: Use bin2hex instead of a re-implementation
        scsi: target: iscsi: Use hex2bin instead of a re-implementation
        scsi: lpfc: Synchronize access to remoteport via rport
        scsi: ufs: Disable blk-mq for now
        scsi: sd: Contribute to randomness when running rotational device
        scsi: ibmvscsis: Ensure partition name is properly NUL terminated
        scsi: ibmvscsis: Fix a stringop-overflow warning
      846e8dd4
  5. Sep 25, 2018
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · bfb0e9b4
      Greg Kroah-Hartman authored
      I wrote:
        "USB fixes for 4.19-rc6
      
         Here are some small USB core and driver fixes for reported issues for
         4.19-rc6.
      
         The most visible is the oops fix for when the USB core is built into the
         kernel that is present in 4.18.  Turns out not many people actually do
         that so it went unnoticed for a while.  The rest is some tiny typec,
         musb, and other core fixes.
      
         All have been in linux-next with no reported issues."
      
      * tag 'usb-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
        usb: typec: mux: Take care of driver module reference counting
        usb: core: safely deal with the dynamic quirk lists
        usb: roles: Take care of driver module reference counting
        USB: handle NULL config in usb_find_alt_setting()
        USB: fix error handling in usb_driver_claim_interface()
        USB: remove LPM management from usb_driver_claim_interface()
        USB: usbdevfs: restore warning for nonsensical flags
        USB: usbdevfs: sanitize flags more
        Revert "usb: cdc-wdm: Fix a sleep-in-atomic-context bug in service_outstanding_interrupt()"
        usb: musb: dsps: do not disable CPPI41 irq in driver teardown
      bfb0e9b4
    • Greg Kroah-Hartman's avatar
      Merge tag 'tty-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · ccf791e5
      Greg Kroah-Hartman authored
      I wrote:
        "TTY/Serial driver fixes for 4.19-rc6
      
         Here are a number of small tty and serial driver fixes for reported
         issues for 4.19-rc6.
      
         One should hopefully resolve a much-reported issue that syzbot has found
         in the tty layer.  Although there are still more issues there, getting
         this fixed is nice to see finally happen.
      
         All of these have been in linux-next for a while with no reported
         issues."
      
      * tag 'tty-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        serial: imx: restore handshaking irq for imx1
        tty: vt_ioctl: fix potential Spectre v1
        tty: Drop tty->count on tty_reopen() failure
        serial: cpm_uart: return immediately from console poll
        tty: serial: lpuart: avoid leaking struct tty_struct
        serial: mvebu-uart: Fix reporting of effective CSIZE to userspace
      ccf791e5
    • Greg Kroah-Hartman's avatar
      Merge tag 'char-misc-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · fc0c8146
      Greg Kroah-Hartman authored
      Greg (well I), wrote:
        "Char/Misc driver fixes for 4.19-rc6
      
         Here are some soundwire and intel_th (tracing) driver fixes for some
         reported issues.
      
         All of these have been in linux-next for a week with no reported issues."
      
      * tag 'char-misc-4.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        intel_th: pci: Add Ice Lake PCH support
        intel_th: Fix resource handling for ACPI glue layer
        intel_th: Fix device removal logic
        soundwire: Fix acquiring bus lock twice during master release
        soundwire: Fix incorrect exit after configuring stream
        soundwire: Fix duplicate stream state assignment
      fc0c8146
    • Srikar Dronamraju's avatar
      powerpc/numa: Use associativity if VPHN hcall is successful · 2483ef05
      Srikar Dronamraju authored
      Currently associativity is used to lookup node-id even if the
      preceding VPHN hcall failed. However this can cause CPU to be made
      part of the wrong node, (most likely to be node 0). This is because
      VPHN is not enabled on KVM guests.
      
      With 2ea62630 ("powerpc/topology: Get topology for shared processors at
      boot"), associativity is used to set to the wrong node. Hence KVM
      guest topology is broken.
      
      For example : A 4 node KVM guest before would have reported.
      
        [root@localhost ~]#  numactl -H
        available: 4 nodes (0-3)
        node 0 cpus: 0 1 2 3
        node 0 size: 1746 MB
        node 0 free: 1604 MB
        node 1 cpus: 4 5 6 7
        node 1 size: 2044 MB
        node 1 free: 1765 MB
        node 2 cpus: 8 9 10 11
        node 2 size: 2044 MB
        node 2 free: 1837 MB
        node 3 cpus: 12 13 14 15
        node 3 size: 2044 MB
        node 3 free: 1903 MB
        node distances:
        node   0   1   2   3
          0:  10  40  40  40
          1:  40  10  40  40
          2:  40  40  10  40
          3:  40  40  40  10
      
      Would now report:
      
        [root@localhost ~]# numactl -H
        available: 4 nodes (0-3)
        node 0 cpus: 0 2 3 4 5 6 7 8 9 10 11 12 13 14 15
        node 0 size: 1746 MB
        node 0 free: 1244 MB
        node 1 cpus:
        node 1 size: 2044 MB
        node 1 free: 2032 MB
        node 2 cpus: 1
        node 2 size: 2044 MB
        node 2 free: 2028 MB
        node 3 cpus:
        node 3 size: 2044 MB
        node 3 free: 2032 MB
        node distances:
        node   0   1   2   3
          0:  10  40  40  40
          1:  40  10  40  40
          2:  40  40  10  40
          3:  40  40  40  10
      
      Fix this by skipping associativity lookup if the VPHN hcall failed.
      
      Fixes: 2ea62630
      
       ("powerpc/topology: Get topology for shared processors at boot")
      Signed-off-by: default avatarSrikar Dronamraju <srikar@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      2483ef05
    • Michael Neuling's avatar
      powerpc/tm: Avoid possible userspace r1 corruption on reclaim · 96dc89d5
      Michael Neuling authored
      
      
      Current we store the userspace r1 to PACATMSCRATCH before finally
      saving it to the thread struct.
      
      In theory an exception could be taken here (like a machine check or
      SLB miss) that could write PACATMSCRATCH and hence corrupt the
      userspace r1. The SLB fault currently doesn't touch PACATMSCRATCH, but
      others do.
      
      We've never actually seen this happen but it's theoretically
      possible. Either way, the code is fragile as it is.
      
      This patch saves r1 to the kernel stack (which can't fault) before we
      turn MSR[RI] back on. PACATMSCRATCH is still used but only with
      MSR[RI] off. We then copy r1 from the kernel stack to the thread
      struct once we have MSR[RI] back on.
      
      Suggested-by: default avatarBreno Leitao <leitao@debian.org>
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      96dc89d5
    • Michael Neuling's avatar
      powerpc/tm: Fix userspace r13 corruption · cf13435b
      Michael Neuling authored
      
      
      When we treclaim we store the userspace checkpointed r13 to a scratch
      SPR and then later save the scratch SPR to the user thread struct.
      
      Unfortunately, this doesn't work as accessing the user thread struct
      can take an SLB fault and the SLB fault handler will write the same
      scratch SPRG that now contains the userspace r13.
      
      To fix this, we store r13 to the kernel stack (which can't fault)
      before we access the user thread struct.
      
      Found by running P8 guest + powervm + disable_1tb_segments + TM. Seen
      as a random userspace segfault with r13 looking like a kernel address.
      
      Signed-off-by: default avatarMichael Neuling <mikey@neuling.org>
      Reviewed-by: default avatarBreno Leitao <leitao@debian.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      cf13435b
    • Lu Baolu's avatar
      iommu/vt-d: Handle memory shortage on pasid table allocation · be9e6598
      Lu Baolu authored
      Pasid table memory allocation could return failure due to memory
      shortage. Limit the pasid table size to 1MiB because current 8MiB
      contiguous physical memory allocation can be hard to come by. W/o
      a PASID table, the device could continue to work with only shared
      virtual memory impacted. So, let's go ahead with context mapping
      even the memory allocation for pasid table failed.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107783
      Fixes: cc580e41
      
       ("iommu/vt-d: Per PCI device pasid table interfaces")
      
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Reported-and-tested-by: default avatarPelton Kyle D <kyle.d.pelton@intel.com>
      Tested-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      be9e6598
    • Lubomir Rintel's avatar
      Revert "uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name" · 8c0f9f5b
      Lubomir Rintel authored
      This changes UAPI, breaking iwd and libell:
      
        ell/key.c: In function 'kernel_dh_compute':
        ell/key.c:205:38: error: 'struct keyctl_dh_params' has no member named 'private'; did you mean 'dh_private'?
          struct keyctl_dh_params params = { .private = private,
                                              ^~~~~~~
                                              dh_private
      
      This reverts commit 8a2336e5.
      
      Fixes: 8a2336e5
      
       ("uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name")
      Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: Randy Dunlap <rdunlap@infradead.org>
      cc: Mat Martineau <mathew.j.martineau@linux.intel.com>
      cc: Stephan Mueller <smueller@chronox.de>
      cc: James Morris <jmorris@namei.org>
      cc: "Serge E. Hallyn" <serge@hallyn.com>
      cc: Mat Martineau <mathew.j.martineau@linux.intel.com>
      cc: Andrew Morton <akpm@linux-foundation.org>
      cc: Linus Torvalds <torvalds@linux-foundation.org>
      cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarJames Morris <james.morris@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      8c0f9f5b
    • Mika Westerberg's avatar
      Revert "pinctrl: intel: Do pin translation when lock IRQ" · 72923e54
      Mika Westerberg authored
      This reverts commit 55aedef5.
      
      Commit 55aedef5 ("pinctrl: intel: Do pin translation when lock IRQ")
      added special translation from GPIO number to hardware pin number to
      irq_reqres/relres hooks to avoid failure when IRQs are requested. The
      actual failure happened inside gpiochip_lock_as_irq() because it calls
      gpiod_get_direction() and pinctrl-intel.c::intel_gpio_get_direction()
      implementation originally missed the translation so the two hooks made
      it work by skipping the ->get_direction() call entirely (it overwrote
      the default GPIOLIB provided functions).
      
      The proper fix that adds translation to GPIO callbacks was merged with
      commit 96147db1 ("pinctrl: intel: Do pin translation in other GPIO
      operations as well"). This allows us to use the default GPIOLIB provided
      functions again.
      
      In addition as find out by Benjamin Tissoires the two functions
      (intel_gpio_irq_reqres()/intel_gpio_irq_relres()) now cause problems of
      their own because they operate on pin numbers and pass that pin number
      to gpiochip_lock_as_irq() which actually expects a GPIO number.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=199911
      Fixes: 55aedef5
      
       ("pinctrl: intel: Do pin translation when lock IRQ")
      Reported-and-tested-by: default avatarBenjamin Tissoires <benjamin.tissoires@gmail.com>
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      72923e54
    • Mika Westerberg's avatar
      pinctrl: cannonlake: Fix HOSTSW_OWN register offset of H variant · e50d95e2
      Mika Westerberg authored
      It turns out the HOSTSW_OWN register offset is different between LP and
      H variants. The latter should use 0xc0 instead so fix that.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=199911
      Fixes: a663ccf0
      
       ("pinctrl: intel: Add Intel Cannon Lake PCH-H pin controller support")
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      e50d95e2