1. 29 Sep, 2018 4 commits
    • 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
  2. 28 Sep, 2018 4 commits
    • 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
    • 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
  3. 27 Sep, 2018 10 commits
  4. 26 Sep, 2018 4 commits
  5. 25 Sep, 2018 18 commits
    • 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
    • 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
    • Daniel Kurtz's avatar
      pinctrl/amd: poll InterruptEnable bits in amd_gpio_irq_set_type · b85bfa24
      Daniel Kurtz authored
      From the AMD BKDG, if WAKE_INT_MASTER_REG.MaskStsEn is set, a software
      write to the debounce registers of *any* gpio will block wake/interrupt
      status generation for *all* gpios for a length of time that depends on
      WAKE_INT_MASTER_REG.MaskStsLength[11:0].  During this period the Interrupt
      Delivery bit (INTERRUPT_ENABLE) will read as 0.
      
      In commit 4c1de041 ("pinctrl/amd: poll InterruptEnable bits in
      enable_irq") we tried to fix this same "gpio Interrupts are blocked
      immediately after writing debounce registers" problem, but incorrectly
      assumed it only affected the gpio whose debounce was being configured
      and not ALL gpios.
      
      To solve this for all gpios, we move the polling loop from
      amd_gpio_irq_enable() to amd_gpio_irq_set_type(), while holding the gpio
      spinlock.  This ensures that another gpio operation (e.g.
      amd_gpio_irq_unmask()) can read a temporarily disabled IRQ and
      incorrectly disable it while trying to modify some other register bits.
      
      Fixes: 4c1de041 pinctrl/amd: poll InterruptEnable bits in enable_irq
      Signed-off-by: default avatarDaniel Kurtz <djkurtz@chromium.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      b85bfa24
    • Greg Kroah-Hartman's avatar
      Merge gitolite.kernel.org:/pub/scm/linux/kernel/git/davem/net · 2dd68cc7
      Greg Kroah-Hartman authored
      Dave writes:
        "Networking fixes:
      
        1) Fix multiqueue handling of coalesce timer in stmmac, from Jose
           Abreu.
      
         2) Fix memory corruption in NFC, from Suren Baghdasaryan.
      
         3) Don't write reserved bits in ravb driver, from Kazuya Mizuguchi.
      
         4) SMC bug fixes from Karsten Graul, YueHaibing, and Ursula Braun.
      
         5) Fix TX done race in mvpp2, from Antoine Tenart.
      
         6) ipv6 metrics leak, from Wei Wang.
      
         7) Adjust firmware version requirements in mlxsw, from Petr Machata.
      
         8) Fix autonegotiation on resume in r8169, from Heiner Kallweit.
      
         9) Fixed missing entries when dumping /proc/net/if_inet6, from Jeff
            Barnhill.
      
         10) Fix double free in devlink, from Dan Carpenter.
      
         11) Fix ethtool regression from UFO feature removal, from Maciej
             Żenczykowski.
      
         12) Fix drivers that have a ndo_poll_controller() that captures the
             cpu entirely on loaded hosts by trying to drain all rx and tx
             queues, from Eric Dumazet.
      
         13) Fix memory corruption with jumbo frames in aquantia driver, from
             Friedemann Gerold."
      
      * gitolite.kernel.org:/pub/scm/linux/kernel/git/davem/net: (79 commits)
        net: mvneta: fix the remaining Rx descriptor unmapping issues
        ip_tunnel: be careful when accessing the inner header
        mpls: allow routes on ip6gre devices
        net: aquantia: memory corruption on jumbo frames
        tun: remove ndo_poll_controller
        nfp: remove ndo_poll_controller
        bnxt: remove ndo_poll_controller
        bnx2x: remove ndo_poll_controller
        mlx5: remove ndo_poll_controller
        mlx4: remove ndo_poll_controller
        i40evf: remove ndo_poll_controller
        ice: remove ndo_poll_controller
        igb: remove ndo_poll_controller
        ixgb: remove ndo_poll_controller
        fm10k: remove ndo_poll_controller
        ixgbevf: remove ndo_poll_controller
        ixgbe: remove ndo_poll_controller
        bonding: use netpoll_poll_dev() helper
        netpoll: make ndo_poll_controller() optional
        rds: Fix build regression.
        ...
      2dd68cc7
    • Heiko Stuebner's avatar
      iommu/rockchip: Free irqs in shutdown handler · 74bc2abc
      Heiko Stuebner authored
      In the iommu's shutdown handler we disable runtime-pm which could
      result in the irq-handler running unclocked and since commit
          3fc7c5c0 ("iommu/rockchip: Handle errors returned from PM framework")
      we warn about that fact.
      
      This can cause warnings on shutdown on some Rockchip machines, so
      free the irqs in the shutdown handler before we disable runtime-pm.
      Reported-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
      Fixes: 3fc7c5c0 ("iommu/rockchip: Handle errors returned from PM framework")
      Signed-off-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Tested-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
      Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      74bc2abc