1. 28 Jun, 2020 2 commits
    • Linus Torvalds's avatar
      Merge tag 'x86_entry_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a358505d
      Linus Torvalds authored
      Pull x86 entry fixes from Borislav Petkov:
       "This is the x86/entry urgent pile which has accumulated since the
        merge window.
      
        It is not the smallest but considering the almost complete entry core
        rewrite, the amount of fixes to follow is somewhat higher than usual,
        which is to be expected.
      
        Peter Zijlstra says:
         'These patches address a number of instrumentation issues that were
          found after the x86/entry overhaul. When combined with rcu/urgent
          and objtool/urgent, these patches make UBSAN/KASAN/KCSAN happy
          again.
      
          Part of making this all work is bumping the minimum GCC version for
          KASAN builds to gcc-8.3, the reason for this is that the
          __no_sanitize_address function attribute is broken in GCC releases
          before that.
      
          No known GCC version has a working __no_sanitize_undefined, however
          because the only noinstr violation that results from this happens
          when an UB is found, we treat it like WARN. That is, we allow it to
          violate the noinstr rules in order to get the warning out'"
      
      * tag 'x86_entry_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/entry: Fix #UD vs WARN more
        x86/entry: Increase entry_stack size to a full page
        x86/entry: Fixup bad_iret vs noinstr
        objtool: Don't consider vmlinux a C-file
        kasan: Fix required compiler version
        compiler_attributes.h: Support no_sanitize_undefined check with GCC 4
        x86/entry, bug: Comment the instrumentation_begin() usage for WARN()
        x86/entry, ubsan, objtool: Whitelist __ubsan_handle_*()
        x86/entry, cpumask: Provide non-instrumented variant of cpu_is_offline()
        compiler_types.h: Add __no_sanitize_{address,undefined} to noinstr
        kasan: Bump required compiler version
        x86, kcsan: Add __no_kcsan to noinstr
        kcsan: Remove __no_kcsan_or_inline
        x86, kcsan: Remove __no_kcsan_or_inline usage
      a358505d
    • David Howells's avatar
      afs: Fix storage of cell names · 719fdd32
      David Howells authored
      The cell name stored in the afs_cell struct is a 64-char + NUL buffer -
      when it needs to be able to handle up to AFS_MAXCELLNAME (256 chars) + NUL.
      
      Fix this by changing the array to a pointer and allocating the string.
      
      Found using Coverity.
      
      Fixes: 989782dc ("afs: Overhaul cell database management")
      Reported-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      719fdd32
  2. 27 Jun, 2020 17 commits
    • Linus Torvalds's avatar
      Merge tag '5.8-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 · 916a3b0f
      Linus Torvalds authored
      Pull cifs fixes from Steve French:
       "Six cifs/smb3 fixes, three of them for stable.
      
        Fixes xfstests 451, 313 and 316"
      
      * tag '5.8-rc2-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: misc: Use array_size() in if-statement controlling expression
        cifs: update ctime and mtime during truncate
        cifs/smb3: Fix data inconsistent when punch hole
        cifs/smb3: Fix data inconsistent when zero file range
        cifs: Fix double add page to memcg when cifs_readpages
        cifs: Fix cached_fid refcnt leak in open_shroot
      916a3b0f
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 3cd1c5d5
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Six small fixes, five in drivers and one to correct another minor
        regression from cc97923a ("block: move dma drain handling to
        scsi") where we still need the drain stub to be built in to the kernel
        for the modular libata, non-modular SAS driver case"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: mptscsih: Fix read sense data size
        scsi: zfcp: Fix panic on ERP timeout for previously dismissed ERP action
        scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()
        scsi: libata: Fix the ata_scsi_dma_need_drain stub
        scsi: qla2xxx: Keep initiator ports after RSCN
        scsi: qla2xxx: Set NVMe status code for failed NVMe FCP request
      3cd1c5d5
    • Linus Torvalds's avatar
      Merge tag 'vfio-v5.8-rc3' of git://github.com/awilliam/linux-vfio · c322f539
      Linus Torvalds authored
      Pull VFIO fixes from Alex Williamson:
      
       - Fix double free of eventfd ctx (Alex Williamson)
      
       - Fix duplicate use of capability ID (Alex Williamson)
      
       - Fix SR-IOV VF memory enable handling (Alex Williamson)
      
      * tag 'vfio-v5.8-rc3' of git://github.com/awilliam/linux-vfio:
        vfio/pci: Fix SR-IOV VF handling with MMIO blocking
        vfio/type1: Fix migration info capability ID
        vfio/pci: Clear error and request eventfd ctx after releasing
      c322f539
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 8bf98651
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "This contains a 5.8 regression fix for the Designware driver, a
        register bitfield fix for the fsi driver, and a missing sanity check
        for the I2C core"
      
      * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: core: check returned size of emulated smbus block read
        i2c: fsi: Fix the port number field in status register
        i2c: designware: Adjust bus speed independently of ACPI
      8bf98651
    • Linus Torvalds's avatar
      Merge tag 'staging-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · 42afe7d1
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are a small number of tiny staging driver fixes for 5.8-rc3.
      
        Not much here, but there were some reported problems to be fixed:
      
         - three wfx driver fixes
      
         - rtl8723bs driver fix
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'staging-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
        Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate()
        staging: wfx: fix coherency of hif_scan() prototype
        staging: wfx: drop useless loop
        staging: wfx: fix AC priority
      42afe7d1
    • Linus Torvalds's avatar
      Merge tag 'usb-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 7eb8f53b
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are some small USB fixes for 5.8-rc3 to resolve some reported
        issues.
      
        Nothing major here:
      
         - gadget driver fixes
      
         - cdns3 driver fixes
      
         - xhci fixes
      
         - renesas_usbhs driver fixes
      
         - some new device support with ids
      
         - documentation update
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'usb-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (27 commits)
        usb: renesas_usbhs: getting residue from callback_result
        Revert "usb: dwc3: exynos: Add support for Exynos5422 suspend clk"
        xhci: Poll for U0 after disabling USB2 LPM
        xhci: Return if xHCI doesn't support LPM
        usb: host: xhci-mtk: avoid runtime suspend when removing hcd
        xhci: Fix enumeration issue when setting max packet size for FS devices.
        xhci: Fix incorrect EP_STATE_MASK
        usb: cdns3: ep0: add spinlock for cdns3_check_new_setup
        usb: cdns3: trace: using correct dir value
        usb: cdns3: ep0: fix the test mode set incorrectly
        Revert "usb: dwc3: exynos: Add support for Exynos5422 suspend clk"
        usb: gadget: udc: Potential Oops in error handling code
        usb: phy: tegra: Fix unnecessary check in tegra_usb_phy_probe()
        usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work
        usb: cdns3: ep0: add spinlock for cdns3_check_new_setup
        usb: cdns3: trace: using correct dir value
        usb: cdns3: ep0: fix the test mode set incorrectly
        usb: typec: tcpci_rt1711h: avoid screaming irq causing boot hangs
        USB: ohci-sm501: Add missed iounmap() in remove
        cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip
        ...
      7eb8f53b
    • Linus Torvalds's avatar
      Merge tag 'char-misc-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · fc3ebc3c
      Linus Torvalds authored
      Pull char/misc fixes from Greg KH:
       "Some tiny char/misc driver fixes for 5.8-rc3.
      
        The "largest" changes are in the mei driver, to resolve some reported
        problems and add some new device ids. There's also a binder bugfix, an
        fpga driver build fix, and some assorted habanalabs fixes.
      
        All of these, except for the habanalabs fixes, have been in linux-next
        with no reported issues. The habanalabs driver changes showed up in my
        tree on Friday, but as they are totally self-contained, all should be
        good there"
      
      * tag 'char-misc-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        habanalabs: increase h/w timer when checking idle
        habanalabs: Correct handling when failing to enqueue CB
        habanalabs: increase GAUDI QMAN ARB WDT timeout
        habanalabs: rename mmu_write() to mmu_asid_va_write()
        habanalabs: use PI in MMU cache invalidation
        habanalabs: block scalar load_and_exe on external queue
        mei: me: add tiger lake point device ids for H platforms.
        mei: me: disable mei interface on Mehlow server platforms
        binder: fix null deref of proc->context
        fpga: zynqmp: fix modular build
      fc3ebc3c
    • Linus Torvalds's avatar
      Merge tag 'edac_urgent_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras · 42f8f9bc
      Linus Torvalds authored
      Pull EDAC fix from Borislav Petkov:
       "A single fix for amd64_edac restoring the reporting of the DRAM scrub
        rate on family 0x15 CPUs"
      
      * tag 'edac_urgent_for_5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
        EDAC/amd64: Read back the scrub rate PCI register on F15h
      42f8f9bc
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-5.8-4' of git://git.infradead.org/users/hch/dma-mapping · f05baa06
      Linus Torvalds authored
      Pull dma-mapping fixes from Christoph Hellwig:
      
       - fix dma coherent mmap in nommu (me)
      
       - more AMD SEV fallout (David Rientjes, me)
      
       - fix alignment in dma_common_*_remap (Eric Auger)
      
      * tag 'dma-mapping-5.8-4' of git://git.infradead.org/users/hch/dma-mapping:
        dma-remap: align the size in dma_common_*_remap()
        dma-mapping: DMA_COHERENT_POOL should select GENERIC_ALLOCATOR
        dma-direct: add missing set_memory_decrypted() for coherent mapping
        dma-direct: check return value when encrypting or decrypting memory
        dma-direct: re-encrypt memory if dma_direct_alloc_pages() fails
        dma-direct: always align allocation size in dma_direct_alloc_pages()
        dma-direct: mark __dma_direct_alloc_pages static
        dma-direct: re-enable mmap for !CONFIG_MMU
      f05baa06
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.8-2' of git://git.linux-nfs.org/projects/anna/linux-nfs · 4e99b321
      Linus Torvalds authored
      Pull NFS client bugfixes from Anna Schumaker:
       "Stable Fixes:
         - xprtrdma: Fix handling of RDMA_ERROR replies
         - sunrpc: Fix rollback in rpc_gssd_dummy_populate()
         - pNFS/flexfiles: Fix list corruption if the mirror count changes
         - NFSv4: Fix CLOSE not waiting for direct IO completion
         - SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
      
        Other Fixes:
         - xprtrdma: Fix a use-after-free with r_xprt->rx_ep
         - Fix other xprtrdma races during disconnect
         - NFS: Fix memory leak of export_path"
      
      * tag 'nfs-for-5.8-2' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
        NFSv4 fix CLOSE not waiting for direct IO compeletion
        pNFS/flexfiles: Fix list corruption if the mirror count changes
        nfs: Fix memory leak of export_path
        sunrpc: fixed rollback in rpc_gssd_dummy_populate()
        xprtrdma: Fix handling of RDMA_ERROR replies
        xprtrdma: Clean up disconnect
        xprtrdma: Clean up synopsis of rpcrdma_flush_disconnect()
        xprtrdma: Use re_connect_status safely in rpcrdma_xprt_connect()
        xprtrdma: Prevent dereferencing r_xprt->rx_ep after it is freed
      4e99b321
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.8-2020-06-26' of git://git.kernel.dk/linux-block · ab0f2473
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Three small fixes:
      
         - Close a corner case for polled IO resubmission (Pavel)
      
         - Toss commands when exiting (Pavel)
      
         - Fix SQPOLL conditional reschedule on perpetually busy submit
           (Xuan)"
      
      * tag 'io_uring-5.8-2020-06-26' of git://git.kernel.dk/linux-block:
        io_uring: fix current->mm NULL dereference on exit
        io_uring: fix hanging iopoll in case of -EAGAIN
        io_uring: fix io_sq_thread no schedule when busy
      ab0f2473
    • Linus Torvalds's avatar
      Merge tag 'block-5.8-2020-06-26' of git://git.kernel.dk/linux-block · 9b8d0207
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request from Christoph:
          - multipath deadlock fixes (Anton)
          - NUMA fixes (Max)
          - RDMA completion vector fix (Max)
          - IO deadlock fix (Sagi)
          - multipath reference fix (Sagi)
          - NS mutation fix (Sagi)
      
       - Use right allocator when freeing bip in error path (Chengguang)
      
      * tag 'block-5.8-2020-06-26' of git://git.kernel.dk/linux-block:
        nvme-multipath: fix bogus request queue reference put
        nvme-multipath: fix deadlock due to head->lock
        nvme: don't protect ns mutation with ns->head->lock
        nvme-multipath: fix deadlock between ana_work and scan_work
        nvme: fix possible deadlock when I/O is blocked
        nvme-rdma: assign completion vector correctly
        nvme-loop: initialize tagset numa value to the value of the ctrl
        nvme-tcp: initialize tagset numa value to the value of the ctrl
        nvme-pci: initialize tagset numa value to the value of the ctrl
        nvme-pci: override the value of the controller's numa node
        nvme: set initial value for controller's numa node
        block: release bip in a right way in error path
      9b8d0207
    • Linus Torvalds's avatar
      Merge tag 'for-5.8/dm-fixes' of... · 5e8eed27
      Linus Torvalds authored
      Merge tag 'for-5.8/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - Quite a few DM zoned target fixes and a Zone append fix in DM core.
      
         Considering the amount of dm-zoned changes that went in during the
         5.8 merge window these fixes are not that surprising.
      
       - A few DM writecache target fixes.
      
       - A fix to Documentation index to include DM ebs target docs.
      
       - Small cleanup to use struct_size() in DM core's retrieve_deps().
      
      * tag 'for-5.8/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm writecache: add cond_resched to loop in persistent_memory_claim()
        dm zoned: Fix reclaim zone selection
        dm zoned: Fix random zone reclaim selection
        dm: update original bio sector on Zone Append
        dm zoned: Fix metadata zone size check
        docs: device-mapper: add dm-ebs.rst to an index file
        dm ioctl: use struct_size() helper in retrieve_deps()
        dm writecache: skip writecache_wait when using pmem mode
        dm writecache: correct uncommitted_block when discarding uncommitted entry
        dm zoned: assign max_io_len correctly
        dm zoned: fix uninitialized pointer dereference
      5e8eed27
    • Linus Torvalds's avatar
      Merge tag 'kgdb-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux · 6116dea8
      Linus Torvalds authored
      Pull kgdb fixes from Daniel Thompson:
       "The main change here is a fix for a number of unsafe interactions
        between kdb and the console system. The fixes are specific to kdb
        (pure kgdb debugging does not use the console system at all). On
        systems with an NMI then kdb, if it is enabled, must get messages to
        the user despite potentially running from some "difficult" calling
        contexts. These fixes avoid using the console system where we have
        been provided an alternative (safer) way to interact with the user
        and, if using the console system in unavoidable, use oops_in_progress
        for deadlock avoidance. These fixes also ensure kdb honours the
        console enable flag.
      
        Also included is a fix that wraps kgdb trap handling in an RCU read
        lock to avoids triggering diagnostic warnings. This is a wide lock
        scope but this is OK because kgdb is a stop-the-world debugger. When
        we stop the world we put all the CPUs into holding pens and this
        inhibits RCU update anyway"
      
      * tag 'kgdb-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
        kgdb: Avoid suspicious RCU usage warning
        kdb: Switch to use safer dbg_io_ops over console APIs
        kdb: Make kdb_printf() console handling more robust
        kdb: Check status of console prior to invoking handlers
        kdb: Re-factor kdb_printf() message write code
      6116dea8
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 21d2f685
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
      
       - A fix for a crash in nested KVM when CONFIG_DEBUG_VIRTUAL=y.
      
       - Two minor build fixes.
      
      Thanks to: Aneesh Kumar K.V, Arseny Solokha, Harish.
      
      * tag 'powerpc-5.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        selftests/powerpc: Fix build failure in ebb tests
        powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL
        powerpc/fsl_booke/32: Fix build with CONFIG_RANDOMIZE_BASE
      21d2f685
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 3b6ab101
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
       "This contains a handful of fixes I'd like to target for rc3.
      
        Most of them fix issues with the conversion of our vDSO to C. There is
        also one fix to the SiFive PRCI driver that I picked up as it's
        causing boot issues on the hardware.
      
         - A fix to allow kernels with dynamic ftrace to use the vDSO.
      
         - Some build fixes for the C vDSO functions.
      
         - A fix to the PRCI driver's memory allocation, which was the cause
           of some boot panics with FREELIST_RANDOM"
      
      * tag 'riscv-for-linus-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Fixup __vdso_gettimeofday broke dynamic ftrace
        riscv: Add extern declarations for vDSO time-related functions
        clk: sifive: allocate sufficient memory for struct __prci_data
        riscv: Add -fPIC option to CFLAGS_vgettimeofday.o
      3b6ab101
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 8530684f
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "The big fix here is to our vDSO sigreturn trampoline as, after a
        painfully long stint of debugging, it turned out that fixing some of
        our CFI directives in the merge window lit up a bunch of logic in
        libgcc which has been shown to SEGV in some cases during asynchronous
        pthread cancellation.
      
        It looks like we can fix this by extending the directives to restore
        most of the interrupted register state from the sigcontext, but it's
        risky and hard to test so we opted to remove the CFI directives for
        now and rely on the unwinder fallback path like we used to.
      
         - Fix unwinding through vDSO sigreturn trampoline
      
         - Fix build warnings by raising minimum LD version for PAC
      
         - Whitelist some Kryo Cortex-A55 derivatives for Meltdown and SSB
      
         - Fix perf register PC reporting for compat tasks
      
         - Fix 'make clean' warning for arm64 signal selftests
      
         - Fix ftrace when BTI is compiled in
      
         - Avoid building the compat vDSO using GCC plugins"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: Add KRYO{3,4}XX silver CPU cores to SSB safelist
        arm64: perf: Report the PC value in REGS_ABI_32 mode
        kselftest: arm64: Remove redundant clean target
        arm64: kpti: Add KRYO{3, 4}XX silver CPU cores to kpti safelist
        arm64: Don't insert a BTI instruction at inner labels
        arm64: vdso: Don't use gcc plugins for building vgettimeofday.c
        arm64: vdso: Only pass --no-eh-frame-hdr when linker supports it
        arm64: Depend on newer binutils when building PAC
        arm64: compat: Remove 32-bit sigreturn code from the vDSO
        arm64: compat: Always use sigpage for sigreturn trampoline
        arm64: compat: Allow 32-bit vdso and sigpage to co-exist
        arm64: vdso: Disable dwarf unwinding through the sigreturn trampoline
      8530684f
  3. 26 Jun, 2020 21 commits
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 1590a2e1
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "Prevent bypassing kernel lockdown via the ACPI tables loading
        interface (Jason A. Donenfeld) and fix the handling of an ACPI sysfs
        attribute (Nathan Chancellor)"
      
      * tag 'acpi-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: sysfs: Fix pm_profile_attr type
        ACPI: configfs: Disallow loading ACPI tables when locked down
      1590a2e1
    • Linus Torvalds's avatar
      Merge tag 'pm-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ed3e00e7
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix a recent regression that broke suspend-to-idle on some x86
        systems, fix the intel_pstate driver to correctly let the platform
        firmware control CPU performance in some cases and add __init
        annotations to a couple of functions.
      
        Specifics:
      
         - Make sure that the _TIF_POLLING_NRFLAG is clear before entering the
           last phase of suspend-to-idle to avoid wakeup issues on some x86
           systems (Chen Yu, Rafael Wysocki).
      
         - Cover one more case in which the intel_pstate driver should let the
           platform firmware control the CPU frequency and refuse to load
           (Srinivas Pandruvada).
      
         - Add __init annotations to 2 functions in the power management core
           (Christophe JAILLET)"
      
      * tag 'pm-5.8-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpuidle: Rearrange s2idle-specific idle state entry code
        PM: sleep: core: mark 2 functions as __init to save some memory
        cpufreq: intel_pstate: Add one more OOB control bit
        PM: s2idle: Clear _TIF_POLLING_NRFLAG before suspend to idle
      ed3e00e7
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · bd37cdf8
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
       "A couple of Intel VT-d fixes:
      
         - Make Intel SVM code 64bit only. The code uses pgd_t* and the IOMMU
           only supports long-mode page-table formats, so its broken on 32bit
           anyway.
      
         - Make sure GFX quirks in for Intel VT-d are not applied to untrusted
           devices. Those devices might gain full memory access otherwise.
      
         - Identity mapping setup fix.
      
         - Fix ACS enabling when Intel IOMMU is off and untrusted devices are
           detected.
      
         - Two smaller fixes for coherency and IO page-table setup"
      
      * tag 'iommu-fixes-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Fix misuse of iommu_domain_identity_map()
        iommu/vt-d: Update scalable mode paging structure coherency
        iommu/vt-d: Enable PCI ACS for platform opt in hint
        iommu/vt-d: Don't apply gfx quirks to untrusted devices
        iommu/vt-d: Set U/S bit in first level page table by default
        iommu/vt-d: Make Intel SVM code 64-bit only
      bd37cdf8
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-06-26' of git://anongit.freedesktop.org/drm/drm · 6a6c9b22
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Usual rc3 pickup, lots of little fixes all over.
      
        The core VT registration regression fix is probably the largest,
        otherwise ttm, amdgpu and tegra are the bulk, with some minor driver
        fixes.
      
        No i915 pull this week which may or may not mean I get 2x of it next
        week, we'll see how it goes.
      
        core:
         - fix VT registration regression
      
        ttm:
         - fix two fence leaks
      
        amdgpu:
         - Fix missed mutex unlock in DC error path
         - Fix firmware leak for sdma5
         - DC bpc property fixes
      
        amdkfd:
         - Fix memleak in an error path
      
        radeon:
         - Fix copy paste typo in NI DPM spll validation
      
        rcar-du:
         - build fix
      
        tegra:
         - add missing zpos property
         - child driver registeration fix
         - debugfs cleanup fix
         - doc fix
      
        mcde:
         - reorder fbdev setup
      
        panel:
         - fix connector type
         - fix orienation for some panels
      
        sun4i:
         - fix dma/iommu configuration
      
        uvesafb:
         - respect blank flag"
      
      * tag 'drm-fixes-2020-06-26' of git://anongit.freedesktop.org/drm/drm: (25 commits)
        drm/amd: fix potential memleak in err branch
        drm/amd/display: Fix ineffective setting of max bpc property
        drm/amd/display: Enable output_bpc property on all outputs
        drm/amdgpu: add fw release for sdma v5_0
        drm/fb-helper: Fix vt restore
        drm/radeon: fix fb_div check in ni_init_smc_spll_table()
        drm/amdgpu/display: Unlock mutex on error
        drm/sun4i: mixer: Call of_dma_configure if there's an IOMMU
        drm: panel-orientation-quirks: Use generic orientation-data for Acer S1003
        drm: panel-orientation-quirks: Add quirk for Asus T101HA panel
        video: fbdev: uvesafb: fix "noblank" option handling
        drm/panel-simple: fix connector type for newhaven_nhd_43_480272ef_atxl
        drm/panel-simple: fix connector type for LogicPD Type28 Display
        drm: rcar-du: Fix build error
        drm: mcde: Fix forgotten user of drm->dev_private
        drm: mcde: Fix display initialization problem
        drm/tegra: Add zpos property for cursor planes
        gpu: host1x: Detach driver on unregister
        gpu: host1x: Correct trivial kernel-doc inconsistencies
        drm/tegra: hub: Register child devices
        ...
      6a6c9b22
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 7c902e27
      Linus Torvalds authored
      Merge misx fixes from Andrew Morton:
       "31 patches.
      
        Subsystems affected by this patch series: hotfixes, mm/pagealloc,
        kexec, ocfs2, lib, mm/slab, mm/slab, mm/slub, mm/swap, mm/pagemap,
        mm/vmalloc, mm/memcg, mm/gup, mm/thp, mm/vmscan, x86,
        mm/memory-hotplug, MAINTAINERS"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (31 commits)
        MAINTAINERS: update info for sparse
        mm/memory_hotplug.c: fix false softlockup during pfn range removal
        mm: remove vmalloc_exec
        arm64: use PAGE_KERNEL_ROX directly in alloc_insn_page
        x86/hyperv: allocate the hypercall page with only read and execute bits
        mm/memory: fix IO cost for anonymous page
        mm/swap: fix for "mm: workingset: age nonresident information alongside anonymous pages"
        mm: workingset: age nonresident information alongside anonymous pages
        doc: THP CoW fault no longer allocate THP
        docs: mm/gup: minor documentation update
        mm/memcontrol.c: prevent missed memory.low load tears
        mm/memcontrol.c: add missed css_put()
        mm: memcontrol: handle div0 crash race condition in memory.low
        mm/vmalloc.c: fix a warning while make xmldocs
        media: omap3isp: remove cacheflush.h
        make asm-generic/cacheflush.h more standalone
        mm/debug_vm_pgtable: fix build failure with powerpc 8xx
        mm/memory.c: properly pte_offset_map_lock/unlock in vm_insert_pages()
        mm: fix swap cache node allocation mask
        slub: cure list_slab_objects() from double fix
        ...
      7c902e27
    • Greg Kroah-Hartman's avatar
      Merge tag 'fpga-fixes-for-5.8' of... · 70b23b87
      Greg Kroah-Hartman authored
      Merge tag 'fpga-fixes-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-next
      
      FPGA Manager fixes for 5.8-rc1
      
      Here is one (late) fix for 5.8-rc1 merge window.
      
      Arnd's change addresses a missing build dependency.
      
      All patches have been reviewed on the mailing list, and have been in the
      last few linux-next releases (as part of my fixes branch) without issues.
      Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
      
      * tag 'fpga-fixes-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga:
        fpga: zynqmp: fix modular build
      70b23b87
    • Greg Kroah-Hartman's avatar
      Merge tag 'misc-habanalabs-fixes-2020-06-24' of... · 56e28775
      Greg Kroah-Hartman authored
      Merge tag 'misc-habanalabs-fixes-2020-06-24' of git://people.freedesktop.org/~gabbayo/linux into char-misc-linus
      
      Oded writes:
      
      This tag contains the following fixes for kernel 5.8-rc2:
      
      - close security hole in GAUDI command buffer parsing by blocking an
        instruction that might allow user to run command buffer that wasn't
        parsed on a secured engine.
      
      - Fix bug in GAUDI MMU cache invalidation code.
      
      - Rename a function to resolve conflict with a static inline function in
        arch/m68k/include/asm/mcfmmu.h
      
      - Increase watchdog timeout of GAUDI QMAN arbitration H/W to prevent false
        reports on timeouts
      
      - Fix bug of dereferencing NULL pointer when an error occurs during command
        submission
      
      - Increase H/W timer for checking if PDMA engine is IDLE in GAUDI.
      
      * tag 'misc-habanalabs-fixes-2020-06-24' of git://people.freedesktop.org/~gabbayo/linux:
        habanalabs: increase h/w timer when checking idle
        habanalabs: Correct handling when failing to enqueue CB
        habanalabs: increase GAUDI QMAN ARB WDT timeout
        habanalabs: rename mmu_write() to mmu_asid_va_write()
        habanalabs: use PI in MMU cache invalidation
        habanalabs: block scalar load_and_exe on external queue
      56e28775
    • Greg Kroah-Hartman's avatar
      Merge tag 'fixes-for-v5.8-rc2' of... · ed8fa042
      Greg Kroah-Hartman authored
      Merge tag 'fixes-for-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus
      
      Felipe writes:
      
      usb: fixes for v5.8-rc2
      
      A revert of Exynos5422 suspend clock support, it turns out it wasn't
      ready to be merged. CDNS3 got a fix for test mode initialization.
      Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
      
      * tag 'fixes-for-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb:
        Revert "usb: dwc3: exynos: Add support for Exynos5422 suspend clk"
        usb: gadget: udc: Potential Oops in error handling code
        usb: phy: tegra: Fix unnecessary check in tegra_usb_phy_probe()
        usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work
        usb: cdns3: ep0: add spinlock for cdns3_check_new_setup
        usb: cdns3: trace: using correct dir value
        usb: cdns3: ep0: fix the test mode set incorrectly
      ed8fa042
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq' and 'pm-cpuidle' · 0e3fb2a1
      Rafael J. Wysocki authored
      * pm-cpufreq:
        cpufreq: intel_pstate: Add one more OOB control bit
      
      * pm-cpuidle:
        cpuidle: Rearrange s2idle-specific idle state entry code
        PM: s2idle: Clear _TIF_POLLING_NRFLAG before suspend to idle
      0e3fb2a1
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-sysfs' · 0f29c20b
      Rafael J. Wysocki authored
      * acpi-sysfs:
        ACPI: sysfs: Fix pm_profile_attr type
      0f29c20b
    • Greg Kroah-Hartman's avatar
      Merge 5.8-rc2 into usb-linus · 603ea288
      Greg Kroah-Hartman authored
      Felipe has based his patches on that tag, so update my usb-linus branch
      to it as well so that I can pull his patches in here easier.
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      603ea288
    • Douglas Anderson's avatar
      kgdb: Avoid suspicious RCU usage warning · 440ab9e1
      Douglas Anderson authored
      At times when I'm using kgdb I see a splat on my console about
      suspicious RCU usage.  I managed to come up with a case that could
      reproduce this that looked like this:
      
        WARNING: suspicious RCU usage
        5.7.0-rc4+ #609 Not tainted
        -----------------------------
        kernel/pid.c:395 find_task_by_pid_ns() needs rcu_read_lock() protection!
      
        other info that might help us debug this:
      
          rcu_scheduler_active = 2, debug_locks = 1
        3 locks held by swapper/0/1:
         #0: ffffff81b6b8e988 (&dev->mutex){....}-{3:3}, at: __device_attach+0x40/0x13c
         #1: ffffffd01109e9e8 (dbg_master_lock){....}-{2:2}, at: kgdb_cpu_enter+0x20c/0x7ac
         #2: ffffffd01109ea90 (dbg_slave_lock){....}-{2:2}, at: kgdb_cpu_enter+0x3ec/0x7ac
      
        stack backtrace:
        CPU: 7 PID: 1 Comm: swapper/0 Not tainted 5.7.0-rc4+ #609
        Hardware name: Google Cheza (rev3+) (DT)
        Call trace:
         dump_backtrace+0x0/0x1b8
         show_stack+0x1c/0x24
         dump_stack+0xd4/0x134
         lockdep_rcu_suspicious+0xf0/0x100
         find_task_by_pid_ns+0x5c/0x80
         getthread+0x8c/0xb0
         gdb_serial_stub+0x9d4/0xd04
         kgdb_cpu_enter+0x284/0x7ac
         kgdb_handle_exception+0x174/0x20c
         kgdb_brk_fn+0x24/0x30
         call_break_hook+0x6c/0x7c
         brk_handler+0x20/0x5c
         do_debug_exception+0x1c8/0x22c
         el1_sync_handler+0x3c/0xe4
         el1_sync+0x7c/0x100
         rpmh_rsc_probe+0x38/0x420
         platform_drv_probe+0x94/0xb4
         really_probe+0x134/0x300
         driver_probe_device+0x68/0x100
         __device_attach_driver+0x90/0xa8
         bus_for_each_drv+0x84/0xcc
         __device_attach+0xb4/0x13c
         device_initial_probe+0x18/0x20
         bus_probe_device+0x38/0x98
         device_add+0x38c/0x420
      
      If I understand properly we should just be able to blanket kgdb under
      one big RCU read lock and the problem should go away.  We'll add it to
      the beast-of-a-function known as kgdb_cpu_enter().
      
      With this I no longer get any splats and things seem to work fine.
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Link: https://lore.kernel.org/r/20200602154729.v2.1.I70e0d4fd46d5ed2aaf0c98a355e8e1b7a5bb7e4e@changeidSigned-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      440ab9e1
    • Sumit Garg's avatar
      kdb: Switch to use safer dbg_io_ops over console APIs · 5946d1f5
      Sumit Garg authored
      In kgdb context, calling console handlers aren't safe due to locks used
      in those handlers which could in turn lead to a deadlock. Although, using
      oops_in_progress increases the chance to bypass locks in most console
      handlers but it might not be sufficient enough in case a console uses
      more locks (VT/TTY is good example).
      
      Currently when a driver provides both polling I/O and a console then kdb
      will output using the console. We can increase robustness by using the
      currently active polling I/O driver (which should be lockless) instead
      of the corresponding console. For several common cases (e.g. an
      embedded system with a single serial port that is used both for console
      output and debugger I/O) this will result in no console handler being
      used.
      
      In order to achieve this we need to reverse the order of preference to
      use dbg_io_ops (uses polling I/O mode) over console APIs. So we just
      store "struct console" that represents debugger I/O in dbg_io_ops and
      while emitting kdb messages, skip console that matches dbg_io_ops
      console in order to avoid duplicate messages. After this change,
      "is_console" param becomes redundant and hence removed.
      Suggested-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      Signed-off-by: default avatarSumit Garg <sumit.garg@linaro.org>
      Link: https://lore.kernel.org/r/1591264879-25920-5-git-send-email-sumit.garg@linaro.orgReviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
      Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
      5946d1f5
    • Chuck Lever's avatar
      SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment() · 89a3c9f5
      Chuck Lever authored
      @subbuf is an output parameter of xdr_buf_subsegment(). A survey of
      call sites shows that @subbuf is always uninitialized before
      xdr_buf_segment() is invoked by callers.
      
      There are some execution paths through xdr_buf_subsegment() that do
      not set all of the fields in @subbuf, leaving some pointer fields
      containing garbage addresses. Subsequent processing of that buffer
      then results in a page fault.
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      89a3c9f5
    • Olga Kornievskaia's avatar
      NFSv4 fix CLOSE not waiting for direct IO compeletion · d03727b2
      Olga Kornievskaia authored
      Figuring out the root case for the REMOVE/CLOSE race and
      suggesting the solution was done by Neil Brown.
      
      Currently what happens is that direct IO calls hold a reference
      on the open context which is decremented as an asynchronous task
      in the nfs_direct_complete(). Before reference is decremented,
      control is returned to the application which is free to close the
      file. When close is being processed, it decrements its reference
      on the open_context but since directIO still holds one, it doesn't
      sent a close on the wire. It returns control to the application
      which is free to do other operations. For instance, it can delete a
      file. Direct IO is finally releasing its reference and triggering
      an asynchronous close. Which races with the REMOVE. On the server,
      REMOVE can be processed before the CLOSE, failing the REMOVE with
      EACCES as the file is still opened.
      Signed-off-by: default avatarOlga Kornievskaia <kolga@netapp.com>
      Suggested-by: default avatarNeil Brown <neilb@suse.com>
      CC: stable@vger.kernel.org
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      d03727b2
    • Trond Myklebust's avatar
      pNFS/flexfiles: Fix list corruption if the mirror count changes · 8b040137
      Trond Myklebust authored
      If the mirror count changes in the new layout we pick up inside
      ff_layout_pg_init_write(), then we can end up adding the
      request to the wrong mirror and corrupting the mirror->pg_list.
      
      Fixes: d600ad1f ("NFS41: pop some layoutget errors to application")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      8b040137
    • Tom Rix's avatar
      nfs: Fix memory leak of export_path · 4659ed7c
      Tom Rix authored
      The try_location function is called within a loop by nfs_follow_referral.
      try_location calls nfs4_pathname_string to created the export_path.
      nfs4_pathname_string allocates the memory. export_path is stored in the
      nfs_fs_context/fs_context structure similarly as hostname and source.
      But whereas the ctx hostname and source are freed before assignment,
      export_path is not.  So if there are multiple loops, the new export_path
      will overwrite the old without the old being freed.
      
      So call kfree for export_path.
      Signed-off-by: default avatarTom Rix <trix@redhat.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      4659ed7c
    • Vasily Averin's avatar
      sunrpc: fixed rollback in rpc_gssd_dummy_populate() · b7ade381
      Vasily Averin authored
      __rpc_depopulate(gssd_dentry) was lost on error path
      
      cc: stable@vger.kernel.org
      Fixes: commit 4b9a445e ("sunrpc: create a new dummy pipe for gssd to hold open")
      Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
      Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
      b7ade381
    • Ingo Molnar's avatar
      Merge branch 'linus' into x86/entry, to resolve conflicts · 2c92d787
      Ingo Molnar authored
      Conflicts:
      	arch/x86/kernel/traps.c
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      2c92d787
    • Mans Rullgard's avatar
      i2c: core: check returned size of emulated smbus block read · 40e05200
      Mans Rullgard authored
      If the i2c bus driver ignores the I2C_M_RECV_LEN flag (as some of
      them do), it is possible for an I2C_SMBUS_BLOCK_DATA read issued
      on some random device to return an arbitrary value in the first
      byte (and nothing else).  When this happens, i2c_smbus_xfer_emulated()
      will happily write past the end of the supplied data buffer, thus
      causing Bad Things to happen.  To prevent this, check the size
      before copying the data block and return an error if it is too large.
      
      Fixes: 209d27c3 ("i2c: Emulate SMBus block read over I2C")
      Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
      [wsa: use better errno]
      Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
      40e05200
    • Luc Van Oostenryck's avatar
      MAINTAINERS: update info for sparse · 19ef1f9d
      Luc Van Oostenryck authored
      Update the info for sparse. More specifically:
      
       - change W entry to point to sparse.docs.kernel.org
      
       - add Q & B entry (patchwork & bugzilla)
      
      Link: http://lkml.kernel.org/r/20200621144204.53938-1-luc.vanoostenryck@gmail.comSigned-off-by: default avatarLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      19ef1f9d