1. 31 Oct, 2019 1 commit
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-5.4-rc6' of git://git.infradead.org/users/vkoul/slave-dma · e472c64a
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "A few fixes to the dmaengine drivers:
      
         - fix in sprd driver for link list and potential memory leak
      
         - tegra transfer failure fix
      
         - imx size check fix for script_number
      
         - xilinx fix for 64bit AXIDMA and control reg update
      
         - qcom bam dma resource leak fix
      
         - cppi slave transfer fix when idle"
      
      * tag 'dmaengine-fix-5.4-rc6' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle
        dmaengine: qcom: bam_dma: Fix resource leak
        dmaengine: sprd: Fix the possible memory leak issue
        dmaengine: xilinx_dma: Fix control reg update in vdma_channel_set_config
        dmaengine: xilinx_dma: Fix 64-bit simple AXIDMA transfer
        dmaengine: imx-sdma: fix size check for sdma script_number
        dmaengine: tegra210-adma: fix transfer failure
        dmaengine: sprd: Fix the link-list pointer register configuration issue
      e472c64a
  2. 30 Oct, 2019 6 commits
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 320000e7
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - Follow-on fix for Renesas IPMMU to get rid of a redundant error
         message.
      
       - Quirk for AMD IOMMU to make it work on another Acer Laptop model with
         a broken IVRS ACPI table.
      
       - Fix for a panic at kdump in the Intel IOMMU driver.
      
      * tag 'iommu-fixes-v5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Fix panic after kexec -p for kdump
        iommu/amd: Apply the same IVRS IOAPIC workaround to Acer Aspire A315-41
        iommu/ipmmu-vmsa: Remove dev_err() on platform_get_irq() failure
      320000e7
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v5.4-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · b66b4498
      Linus Torvalds authored
      Pull gfs2 fix from Andreas Gruenbacher:
       "Fix remounting (broken in -rc1)."
      
      * tag 'gfs2-v5.4-rc5.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Fix initialisation of args for remount
      b66b4498
    • Andrew Price's avatar
      gfs2: Fix initialisation of args for remount · d5798141
      Andrew Price authored
      When gfs2 was converted to use fs_context, the initialisation of the
      mount args structure to the currently active args was lost with the
      removal of gfs2_remount_fs(), so the checks of the new args on remount
      became checks against the default values instead of the current ones.
      This caused unexpected remount behaviour and test failures (xfstests
      generic/294, generic/306 and generic/452).
      
      Reinstate the args initialisation, this time in gfs2_init_fs_context()
      and conditional upon fc->purpose, as that's the only time we get control
      before the mount args are parsed in the remount process.
      
      Fixes: 1f52aa08 ("gfs2: Convert gfs2 to fs_context")
      Signed-off-by: default avatarAndrew Price <anprice@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      d5798141
    • John Donnelly's avatar
      iommu/vt-d: Fix panic after kexec -p for kdump · 160c63f9
      John Donnelly authored
      This cures a panic on restart after a kexec operation on 5.3 and 5.4
      kernels.
      
      The underlying state of the iommu registers (iommu->flags &
      VTD_FLAG_TRANS_PRE_ENABLED) on a restart results in a domain being marked as
      "DEFER_DEVICE_DOMAIN_INFO" that produces an Oops in identity_mapping().
      
      [   43.654737] BUG: kernel NULL pointer dereference, address:
      0000000000000056
      [   43.655720] #PF: supervisor read access in kernel mode
      [   43.655720] #PF: error_code(0x0000) - not-present page
      [   43.655720] PGD 0 P4D 0
      [   43.655720] Oops: 0000 [#1] SMP PTI
      [   43.655720] CPU: 0 PID: 1 Comm: swapper/0 Not tainted
      5.3.2-1940.el8uek.x86_64 #1
      [   43.655720] Hardware name: Oracle Corporation ORACLE SERVER
      X5-2/ASM,MOTHERBOARD,1U, BIOS 30140300 09/20/2018
      [   43.655720] RIP: 0010:iommu_need_mapping+0x29/0xd0
      [   43.655720] Code: 00 0f 1f 44 00 00 48 8b 97 70 02 00 00 48 83 fa ff
      74 53 48 8d 4a ff b8 01 00 00 00 48 83 f9 fd 76 01 c3 48 8b 35 7f 58 e0
      01 <48> 39 72 58 75 f2 55 48 89 e5 41 54 53 48 8b 87 28 02 00 00 4c 8b
      [   43.655720] RSP: 0018:ffffc9000001b9b0 EFLAGS: 00010246
      [   43.655720] RAX: 0000000000000001 RBX: 0000000000001000 RCX:
      fffffffffffffffd
      [   43.655720] RDX: fffffffffffffffe RSI: ffff8880719b8000 RDI:
      ffff8880477460b0
      [   43.655720] RBP: ffffc9000001b9e8 R08: 0000000000000000 R09:
      ffff888047c01700
      [   43.655720] R10: 00002194036fc692 R11: 0000000000000000 R12:
      0000000000000000
      [   43.655720] R13: ffff8880477460b0 R14: 0000000000000cc0 R15:
      ffff888072d2b558
      [   43.655720] FS:  0000000000000000(0000) GS:ffff888071c00000(0000)
      knlGS:0000000000000000
      [   43.655720] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   43.655720] CR2: 0000000000000056 CR3: 000000007440a002 CR4:
      00000000001606b0
      [   43.655720] Call Trace:
      [   43.655720]  ? intel_alloc_coherent+0x2a/0x180
      [   43.655720]  ? __schedule+0x2c2/0x650
      [   43.655720]  dma_alloc_attrs+0x8c/0xd0
      [   43.655720]  dma_pool_alloc+0xdf/0x200
      [   43.655720]  ehci_qh_alloc+0x58/0x130
      [   43.655720]  ehci_setup+0x287/0x7ba
      [   43.655720]  ? _dev_info+0x6c/0x83
      [   43.655720]  ehci_pci_setup+0x91/0x436
      [   43.655720]  usb_add_hcd.cold.48+0x1d4/0x754
      [   43.655720]  usb_hcd_pci_probe+0x2bc/0x3f0
      [   43.655720]  ehci_pci_probe+0x39/0x40
      [   43.655720]  local_pci_probe+0x47/0x80
      [   43.655720]  pci_device_probe+0xff/0x1b0
      [   43.655720]  really_probe+0xf5/0x3a0
      [   43.655720]  driver_probe_device+0xbb/0x100
      [   43.655720]  device_driver_attach+0x58/0x60
      [   43.655720]  __driver_attach+0x8f/0x150
      [   43.655720]  ? device_driver_attach+0x60/0x60
      [   43.655720]  bus_for_each_dev+0x74/0xb0
      [   43.655720]  driver_attach+0x1e/0x20
      [   43.655720]  bus_add_driver+0x151/0x1f0
      [   43.655720]  ? ehci_hcd_init+0xb2/0xb2
      [   43.655720]  ? do_early_param+0x95/0x95
      [   43.655720]  driver_register+0x70/0xc0
      [   43.655720]  ? ehci_hcd_init+0xb2/0xb2
      [   43.655720]  __pci_register_driver+0x57/0x60
      [   43.655720]  ehci_pci_init+0x6a/0x6c
      [   43.655720]  do_one_initcall+0x4a/0x1fa
      [   43.655720]  ? do_early_param+0x95/0x95
      [   43.655720]  kernel_init_freeable+0x1bd/0x262
      [   43.655720]  ? rest_init+0xb0/0xb0
      [   43.655720]  kernel_init+0xe/0x110
      [   43.655720]  ret_from_fork+0x24/0x50
      
      Fixes: 8af46c78 ("iommu/vt-d: Implement is_attach_deferred iommu ops entry")
      Cc: stable@vger.kernel.org # v5.3+
      Signed-off-by: default avatarJohn Donnelly <john.p.donnelly@oracle.com>
      Reviewed-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      160c63f9
    • Takashi Iwai's avatar
      iommu/amd: Apply the same IVRS IOAPIC workaround to Acer Aspire A315-41 · ad3e8da2
      Takashi Iwai authored
      Acer Aspire A315-41 requires the very same workaround as the existing
      quirk for Dell Latitude 5495.  Add the new entry for that.
      
      BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1137799Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      ad3e8da2
    • YueHaibing's avatar
      iommu/ipmmu-vmsa: Remove dev_err() on platform_get_irq() failure · 565d4542
      YueHaibing authored
      platform_get_irq() will call dev_err() itself on failure,
      so there is no need for the driver to also do this.
      This is detected by coccinelle.
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      565d4542
  3. 29 Oct, 2019 1 commit
    • Linus Torvalds's avatar
      Merge tag 'fuse-fixes-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 23fdb198
      Linus Torvalds authored
      Pull fuse fixes from Miklos Szeredi:
       "Mostly virtiofs fixes, but also fixes a regression and couple of
        longstanding data/metadata writeback ordering issues"
      
      * tag 'fuse-fixes-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: redundant get_fuse_inode() calls in fuse_writepages_fill()
        fuse: Add changelog entries for protocols 7.1 - 7.8
        fuse: truncate pending writes on O_TRUNC
        fuse: flush dirty data/metadata before non-truncate setattr
        virtiofs: Remove set but not used variable 'fc'
        virtiofs: Retry request submission from worker context
        virtiofs: Count pending forgets as in_flight forgets
        virtiofs: Set FR_SENT flag only after request has been sent
        virtiofs: No need to check fpq->connected state
        virtiofs: Do not end request in submission context
        fuse: don't advise readdirplus for negative lookup
        fuse: don't dereference req->args on finished request
        virtio-fs: don't show mount options
        virtio-fs: Change module name to virtiofs.ko
      23fdb198
  4. 28 Oct, 2019 6 commits
    • Linus Torvalds's avatar
      Merge tag 'arc-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · 8005803a
      Linus Torvalds authored
      Pull ARC fixes from Vineet Gupta:
       "Small fixes for ARC:
      
         - perf fix for Big Endian build [Alexey]
      
         - hadk platform enable soem peripherals [Eugeniy]"
      
      * tag 'arc-5.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: perf: Accommodate big-endian CPU
        ARC: [plat-hsdk]: Enable on-boardi SPI ADC IC
        ARC: [plat-hsdk]: Enable on-board SPI NOR flash IC
      8005803a
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid · 0365fb6b
      Linus Torvalds authored
      Pull HID fixes from Jiri Kosina:
      
       - HID++ device support regression fixes (race condition during cleanup,
         device detection fix, opps fix) from Andrey Smirnov
      
       - disable PM on i2c-hid, as it's causing problems with a lot of
         devices; other OSes apparently don't implement/enable it either; from
         Kai-Heng Feng
      
       - error handling fix in intel-ish driver, from Zhang Lixu
      
       - syzbot fuzzer fix for HID core code from Alan Stern
      
       - a few other tiny fixups (printk message cleanup, new device ID)
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
        HID: i2c-hid: add Trekstor Primebook C11B to descriptor override
        HID: logitech-hidpp: do all FF cleanup in hidpp_ff_destroy()
        HID: logitech-hidpp: rework device validation
        HID: logitech-hidpp: split g920_get_config()
        HID: i2c-hid: Remove runtime power management
        HID: intel-ish-hid: fix wrong error handling in ishtp_cl_alloc_tx_ring()
        HID: google: add magnemite/masterball USB ids
        HID: Fix assumption that devices have inputs
        HID: prodikeys: make array keys static const, makes object smaller
        HID: fix error message in hid_open_report()
      0365fb6b
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 9e5eefba
      Linus Torvalds authored
      Pull virtio fixes from Michael Tsirkin:
       "Some minor fixes"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        vringh: fix copy direction of vringh_iov_push_kern()
        vsock/virtio: remove unused 'work' field from 'struct virtio_vsock_pkt'
        virtio_ring: fix stalls for packed rings
      9e5eefba
    • Jason Wang's avatar
      vringh: fix copy direction of vringh_iov_push_kern() · b3683dee
      Jason Wang authored
      We want to copy from iov to buf, so the direction was wrong.
      
      Note: no real user for the helper, but it will be used by future
      features.
      Signed-off-by: default avatarJason Wang <jasowang@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      b3683dee
    • Stefano Garzarella's avatar
      vsock/virtio: remove unused 'work' field from 'struct virtio_vsock_pkt' · 67715961
      Stefano Garzarella authored
      The 'work' field was introduced with commit 06a8fc78
      ("VSOCK: Introduce virtio_vsock_common.ko")
      but it is never used in the code, so we can remove it to save
      memory allocated in the per-packet 'struct virtio_vsock_pkt'
      Suggested-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarStefano Garzarella <sgarzare@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      67715961
    • Marvin Liu's avatar
      virtio_ring: fix stalls for packed rings · 40ce7919
      Marvin Liu authored
      When VIRTIO_F_RING_EVENT_IDX is negotiated, virtio devices can
      use virtqueue_enable_cb_delayed_packed to reduce the number of device
      interrupts.  At the moment, this is the case for virtio-net when the
      napi_tx module parameter is set to false.
      
      In this case, the virtio driver selects an event offset and expects that
      the device will send a notification when rolling over the event offset
      in the ring.  However, if this roll-over happens before the event
      suppression structure update, the notification won't be sent. To address
      this race condition the driver needs to check wether the device rolled
      over the offset after updating the event suppression structure.
      
      With VIRTIO_F_RING_PACKED, the virtio driver did this by reading the
      flags field of the descriptor at the specified offset.
      
      Unfortunately, checking at the event offset isn't reliable: if
      descriptors are chained (e.g. when INDIRECT is off) not all descriptors
      are overwritten by the device, so it's possible that the device skipped
      the specific descriptor driver is checking when writing out used
      descriptors. If this happens, the driver won't detect the race condition
      and will incorrectly expect the device to send a notification.
      
      For virtio-net, the result will be a TX queue stall, with the
      transmission getting blocked forever.
      
      With the packed ring, it isn't easy to find a location which is
      guaranteed to change upon the roll-over, except the next device
      descriptor, as described in the spec:
      
              Writes of device and driver descriptors can generally be
              reordered, but each side (driver and device) are only required to
              poll (or test) a single location in memory: the next device descriptor after
              the one they processed previously, in circular order.
      
      while this might be sub-optimal, let's do exactly this for now.
      
      Cc: stable@vger.kernel.org
      Cc: Jason Wang <jasowang@redhat.com>
      Fixes: f51f9826 ("virtio_ring: leverage event idx in packed ring")
      Signed-off-by: default avatarMarvin Liu <yong.liu@intel.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      40ce7919
  5. 27 Oct, 2019 7 commits
    • Linus Torvalds's avatar
      Linux 5.4-rc5 · d6d5df1d
      Linus Torvalds authored
      d6d5df1d
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 153a971f
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "Two fixes for the VMWare guest support:
      
         - Unbreak VMWare platform detection which got wreckaged by converting
           an integer constant to a string constant.
      
         - Fix the clang build of the VMWAre hypercall by explicitely
           specifying the ouput register for INL instead of using the short
           form"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu/vmware: Fix platform detection VMWARE_PORT macro
        x86/cpu/vmware: Use the full form of INL in VMWARE_HYPERCALL, for clang/llvm
      153a971f
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2b776b54
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "A small set of fixes for time(keeping):
      
         - Add a missing include to prevent compiler warnings.
      
         - Make the VDSO implementation of clock_getres() POSIX compliant
           again. A recent change dropped the NULL pointer guard which is
           required as NULL is a valid pointer value for this function.
      
         - Fix two function documentation typos"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        posix-cpu-timers: Fix two trivial comments
        timers/sched_clock: Include local timekeeping.h for missing declarations
        lib/vdso: Make clock_getres() POSIX compliant again
      2b776b54
    • Linus Torvalds's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a8a31fdc
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
       "A set of perf fixes:
      
        kernel:
      
         - Unbreak the tracking of auxiliary buffer allocations which got
           imbalanced causing recource limit failures.
      
         - Fix the fallout of splitting of ToPA entries which missed to shift
           the base entry PA correctly.
      
         - Use the correct context to lookup the AUX event when unmapping the
           associated AUX buffer so the event can be stopped and the buffer
           reference dropped.
      
        tools:
      
         - Fix buildiid-cache mode setting in copyfile_mode_ns() when copying
           /proc/kcore
      
         - Fix freeing id arrays in the event list so the correct event is
           closed.
      
         - Sync sched.h anc kvm.h headers with the kernel sources.
      
         - Link jvmti against tools/lib/ctype.o to have weak strlcpy().
      
         - Fix multiple memory and file descriptor leaks, found by coverity in
           perf annotate.
      
         - Fix leaks in error handling paths in 'perf c2c', 'perf kmem', found
           by a static analysis tool"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/aux: Fix AUX output stopping
        perf/aux: Fix tracking of auxiliary trace buffer allocation
        perf/x86/intel/pt: Fix base for single entry topa
        perf kmem: Fix memory leak in compact_gfp_flags()
        tools headers UAPI: Sync sched.h with the kernel
        tools headers kvm: Sync kvm.h headers with the kernel sources
        tools headers kvm: Sync kvm headers with the kernel sources
        tools headers kvm: Sync kvm headers with the kernel sources
        perf c2c: Fix memory leak in build_cl_output()
        perf tools: Fix mode setting in copyfile_mode_ns()
        perf annotate: Fix multiple memory and file descriptor leaks
        perf tools: Fix resource leak of closedir() on the error paths
        perf evlist: Fix fix for freed id arrays
        perf jvmti: Link against tools/lib/ctype.h to have weak strlcpy()
      a8a31fdc
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1e1ac1cb
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "Two fixes for interrupt controller drivers:
      
         - Skip IRQ_M_EXT entries in the device tree when initializing the
           RISCV PLIC controller to avoid a double init attempt.
      
         - Use the correct ITS list when issuing the VMOVP synchronization
           command so the operation works only on the ITS instances which are
           associated to a VM"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/sifive-plic: Skip contexts except supervisor in plic_init()
        irqchip/gic-v3-its: Use the exact ITSList for VMOVP
      1e1ac1cb
    • Linus Torvalds's avatar
      Merge tag '5.4-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · c9a2e4a8
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Seven cifs/smb3 fixes, including three for stable"
      
      * tag '5.4-rc5-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Fix cifsInodeInfo lock_sem deadlock when reconnect occurs
        CIFS: Fix use after free of file info structures
        CIFS: Fix retry mid list corruption on reconnects
        cifs: Fix missed free operations
        CIFS: avoid using MID 0xFFFF
        cifs: clarify comment about timestamp granularity for old servers
        cifs: Handle -EINPROGRESS only when noblockcnt is set
      c9a2e4a8
    • Linus Torvalds's avatar
      Merge tag 'riscv/for-v5.4-rc5-b' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 6995a6a5
      Linus Torvalds authored
      Pull RISC-V fixes from Paul Walmsley:
       "Several minor fixes and cleanups for v5.4-rc5:
      
         - Three build fixes for various SPARSEMEM-related kernel
           configurations
      
         - Two cleanup patches for the kernel bug and breakpoint trap handler
           code"
      
      * tag 'riscv/for-v5.4-rc5-b' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: cleanup do_trap_break
        riscv: cleanup <asm/bug.h>
        riscv: Fix undefined reference to vmemmap_populate_basepages
        riscv: Fix implicit declaration of 'page_to_section'
        riscv: fix fs/proc/kcore.c compilation with sparsemem enabled
      6995a6a5
  6. 26 Oct, 2019 13 commits
  7. 25 Oct, 2019 6 commits
    • Christoph Hellwig's avatar
      riscv: cleanup do_trap_break · e8f44c50
      Christoph Hellwig authored
      If we always compile the get_break_insn_length inline function we can
      remove the ifdefs and let dead code elimination take care of the warn
      branch that is now unreadable because the report_bug stub always
      returns BUG_TRAP_TYPE_BUG.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
      Signed-off-by: default avatarPaul Walmsley <paul.walmsley@sifive.com>
      e8f44c50
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · b4b61b22
      Linus Torvalds authored
      Pull input fix from Dmitry Torokhov:
       "A fix for st1232 driver to properly report coordinates for 2nd and
        subsequent fingers when more than one is on the surface"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: st1232 - fix reporting multitouch coordinates
      b4b61b22
    • Mike Christie's avatar
      nbd: verify socket is supported during setup · cf1b2326
      Mike Christie authored
      nbd requires socket families to support the shutdown method so the nbd
      recv workqueue can be woken up from its sock_recvmsg call. If the socket
      does not support the callout we will leave recv works running or get hangs
      later when the device or module is removed.
      
      This adds a check during socket connection/reconnection to make sure the
      socket being passed in supports the needed callout.
      
      Reported-by: syzbot+24c12fa8d218ed26011a@syzkaller.appspotmail.com
      Fixes: e9e006f5 ("nbd: fix max number of supported devs")
      Tested-by: default avatarRichard W.M. Jones <rjones@redhat.com>
      Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      cf1b2326
    • Mark Brown's avatar
      ata: libahci_platform: Fix regulator_get_optional() misuse · 962399bb
      Mark Brown authored
      This driver is using regulator_get_optional() to handle all the supplies
      that it handles, and only ever enables and disables all supplies en masse
      without ever doing any other configuration of the device to handle missing
      power. These are clear signs that the API is being misused - it should only
      be used for supplies that may be physically absent from the system and in
      these cases the hardware usually needs different configuration if the
      supply is missing. Instead use normal regualtor_get(), if the supply is
      not described in DT then the framework will substitute a dummy regulator in
      so no special handling is needed by the consumer driver.
      
      In the case of the PHY regulator the handling in the driver is a hack to
      deal with integrated PHYs; the supplies are only optional in the sense
      that that there's some confusion in the code about where they're bound to.
      From a code point of view they function exactly as normal supplies so can
      be treated as such. It'd probably be better to model this by instantiating
      a PHY object for integrated PHYs.
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      962399bb
    • Josef Bacik's avatar
      nbd: handle racing with error'ed out commands · 7ce23e8e
      Josef Bacik authored
      We hit the following warning in production
      
      print_req_error: I/O error, dev nbd0, sector 7213934408 flags 80700
      ------------[ cut here ]------------
      refcount_t: underflow; use-after-free.
      WARNING: CPU: 25 PID: 32407 at lib/refcount.c:190 refcount_sub_and_test_checked+0x53/0x60
      Workqueue: knbd-recv recv_work [nbd]
      RIP: 0010:refcount_sub_and_test_checked+0x53/0x60
      Call Trace:
       blk_mq_free_request+0xb7/0xf0
       blk_mq_complete_request+0x62/0xf0
       recv_work+0x29/0xa1 [nbd]
       process_one_work+0x1f5/0x3f0
       worker_thread+0x2d/0x3d0
       ? rescuer_thread+0x340/0x340
       kthread+0x111/0x130
       ? kthread_create_on_node+0x60/0x60
       ret_from_fork+0x1f/0x30
      ---[ end trace b079c3c67f98bb7c ]---
      
      This was preceded by us timing out everything and shutting down the
      sockets for the device.  The problem is we had a request in the queue at
      the same time, so we completed the request twice.  This can actually
      happen in a lot of cases, we fail to get a ref on our config, we only
      have one connection and just error out the command, etc.
      
      Fix this by checking cmd->status in nbd_read_stat.  We only change this
      under the cmd->lock, so we are safe to check this here and see if we've
      already error'ed this command out, which would indicate that we've
      completed it as well.
      Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
      Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      7ce23e8e
    • Josef Bacik's avatar
      nbd: protect cmd->status with cmd->lock · de6346ec
      Josef Bacik authored
      We already do this for the most part, except in timeout and clear_req.
      For the timeout case we take the lock after we grab a ref on the config,
      but that isn't really necessary because we're safe to touch the cmd at
      this point, so just move the order around.
      
      For the clear_req cause this is initiated by the user, so again is safe.
      Reviewed-by: default avatarMike Christie <mchristi@redhat.com>
      Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      de6346ec