Skip to content
  1. Sep 27, 2020
    • Minchan Kim's avatar
      mm: validate pmd after splitting · ce268425
      Minchan Kim authored
      
      
      syzbot reported the following KASAN splat:
      
        general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN
        KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
        CPU: 1 PID: 6826 Comm: syz-executor142 Not tainted 5.9.0-rc4-syzkaller #0
        Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
        RIP: 0010:__lock_acquire+0x84/0x2ae0 kernel/locking/lockdep.c:4296
        Code: ff df 8a 04 30 84 c0 0f 85 e3 16 00 00 83 3d 56 58 35 08 00 0f 84 0e 17 00 00 83 3d 25 c7 f5 07 00 74 2c 4c 89 e8 48 c1 e8 03 <80> 3c 30 00 74 12 4c 89 ef e8 3e d1 5a 00 48 be 00 00 00 00 00 fc
        RSP: 0018:ffffc90004b9f850 EFLAGS: 00010006
        Call Trace:
          lock_acquire+0x140/0x6f0 kernel/locking/lockdep.c:5006
          __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
          _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151
          spin_lock include/linux/spinlock.h:354 [inline]
          madvise_cold_or_pageout_pte_range+0x52f/0x25c0 mm/madvise.c:389
          walk_pmd_range mm/pagewalk.c:89 [inline]
          walk_pud_range mm/pagewalk.c:160 [inline]
          walk_p4d_range mm/pagewalk.c:193 [inline]
          walk_pgd_range mm/pagewalk.c:229 [inline]
          __walk_page_range+0xe7b/0x1da0 mm/pagewalk.c:331
          walk_page_range+0x2c3/0x5c0 mm/pagewalk.c:427
          madvise_pageout_page_range mm/madvise.c:521 [inline]
          madvise_pageout mm/madvise.c:557 [inline]
          madvise_vma mm/madvise.c:946 [inline]
          do_madvise+0x12d0/0x2090 mm/madvise.c:1145
          __do_sys_madvise mm/madvise.c:1171 [inline]
          __se_sys_madvise mm/madvise.c:1169 [inline]
          __x64_sys_madvise+0x76/0x80 mm/madvise.c:1169
          do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
          entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      The backing vma was shmem.
      
      In case of split page of file-backed THP, madvise zaps the pmd instead
      of remapping of sub-pages.  So we need to check pmd validity after
      split.
      
      Reported-by: default avatar <syzbot+ecf80462cb7d5d552bc7@syzkaller.appspotmail.com>
      Fixes: 1a4e58cc
      
       ("mm: introduce MADV_PAGEOUT")
      Signed-off-by: default avatarMinchan Kim <minchan@kernel.org>
      Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ce268425
    • Shakeel Butt's avatar
      mm: slab: fix potential double free in ___cache_free · 678ff6a7
      Shakeel Butt authored
      With the commit 10befea9 ("mm: memcg/slab: use a single set of
      kmem_caches for all allocations"), it becomes possible to call kfree()
      from the slabs_destroy().
      
      The functions cache_flusharray() and do_drain() calls slabs_destroy() on
      array_cache of the local CPU without updating the size of the
      array_cache.  This enables the kfree() call from the slabs_destroy() to
      recursively call cache_flusharray() which can potentially call
      free_block() on the same elements of the array_cache of the local CPU
      and causing double free and memory corruption.
      
      To fix the issue, simply update the local CPU array_cache cache before
      calling slabs_destroy().
      
      Fixes: 10befea9
      
       ("mm: memcg/slab: use a single set of kmem_caches for all allocations")
      Signed-off-by: default avatarShakeel Butt <shakeelb@google.com>
      Reviewed-by: default avatarRoman Gushchin <guro@fb.com>
      Tested-by: default avatarMing Lei <ming.lei@redhat.com>
      Reported-by: default avatarkernel test robot <rong.a.chen@intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Ted Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      678ff6a7
  2. Sep 26, 2020
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 7c7ec322
      Linus Torvalds authored
      Pull more kvm fixes from Paolo Bonzini:
       "Five small fixes.
      
        The nested migration bug will be fixed with a better API in 5.10 or
        5.11, for now this is a fix that works with existing userspace but
        keeps the current ugly API"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: SVM: Add a dedicated INVD intercept routine
        KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE
        KVM: x86: fix MSR_IA32_TSC read for nested migration
        selftests: kvm: Fix assert failure in single-step test
        KVM: x86: VMX: Make smaller physical guest address space support user-configurable
      7c7ec322
    • Linus Torvalds's avatar
      Merge tag 'mips_fixes_5.9_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · b463b6f6
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fixed FP register access on Loongsoon-3
      
       - added missing 1074 cpu handling
      
       - fixed Loongson2ef build error
      
      * tag 'mips_fixes_5.9_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: BCM47XX: Remove the needless check with the 1074K
        MIPS: Add the missing 'CPU_1074K' into __get_cpu_type()
        MIPS: Loongson2ef: Disable Loongson MMI instructions
        MIPS: Loongson-3: Fix fp register access if MSA enabled
      b463b6f6
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 782d1222
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A small collection of driver specific fixes, the fsl-espi and bcm-qspi
        changes in particular have been causing breakage for users"
      
      * tag 'spi-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: bcm-qspi: Fix probe regression on iProc platforms
        spi: fsl-dspi: fix use-after-free in remove path
        spi: fsl-espi: Only process interrupts for expected events
        spi: bcm2835: Make polling_limit_us static
        spi: spi-fsl-dspi: use XSPI mode instead of DMA for DPAA2 SoCs
      782d1222
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.9-rc6' of... · 814324b5
      Linus Torvalds authored
      Merge tag 'regulator-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fix from Mark Brown:
       "A single fix for incorrect specification of some of the register
        fields on axp20x devices which would break voltage setting on affected
        systems"
      
      * tag 'regulator-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: axp20x: fix LDO2/4 description
      814324b5
    • Linus Torvalds's avatar
      Merge tag 'regmap-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap · 9a3a0876
      Linus Torvalds authored
      Pull regmap fixes from Mark Brown:
       "Two issues here - one is a fix for use after free issues in the case
        where a regmap overrides its name using something dynamically
        generated, the other is that we weren't handling access checks
        non-incrementing I/O on registers within paged register regions
        correctly resulting in spurious errors.
      
        Both of these are quite rare but serious if they occur"
      
      * tag 'regmap-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
        regmap: fix page selection for noinc writes
        regmap: fix page selection for noinc reads
        regmap: debugfs: Add back in erroneously removed initialisation of ret
        regmap: debugfs: Fix handling of name string for debugfs init delays
      9a3a0876
    • Linus Torvalds's avatar
      Merge tag 'nfsd-5.9-2' of git://git.linux-nfs.org/projects/cel/cel-2.6 · 6d28cf7d
      Linus Torvalds authored
      Pull NFS server fix from Chuck Lever:
       "Fix incorrect calculation on platforms that implement
        flush_dcache_page()"
      
      * tag 'nfsd-5.9-2' of git://git.linux-nfs.org/projects/cel/cel-2.6:
        SUNRPC: Fix svc_flush_dcache()
      6d28cf7d
    • Linus Torvalds's avatar
      Merge tag 'pm-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 15083aa0
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix more fallout of recent RCU-lockdep changes in CPU idle code
        and two devfreq issues.
      
        Specifics:
      
         - Export rcu_idle_{enter,exit} to modules to fix build issues
           introduced by recent RCU-lockdep fixes (Borislav Petkov)
      
         - Add missing return statement to a stub function in the ACPI
           processor driver to fix a build issue introduced by recent
           RCU-lockdep fixes (Rafael Wysocki)
      
         - Fix recently introduced suspicious RCU usage warnings in the PSCI
           cpuidle driver and drop stale comments regarding RCU_NONIDLE()
           usage from enter_s2idle_proper() (Ulf Hansson)
      
         - Fix error code path in the tegra30 devfreq driver (Dan Carpenter)
      
         - Add missing information to devfreq_summary debugfs (Chanwoo Choi)"
      
      * tag 'pm-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: processor: Fix build for ARCH_APICTIMER_STOPS_ON_C3 unset
        PM / devfreq: tegra30: Disable clock on error in probe
        PM / devfreq: Add timer type to devfreq_summary debugfs
        cpuidle: Drop misleading comments about RCU usage
        cpuidle: psci: Fix suspicious RCU usage
        rcu/tree: Export rcu_idle_{enter,exit} to modules
      15083aa0
    • Tom Lendacky's avatar
      KVM: SVM: Add a dedicated INVD intercept routine · 4bb05f30
      Tom Lendacky authored
      The INVD instruction intercept performs emulation. Emulation can't be done
      on an SEV guest because the guest memory is encrypted.
      
      Provide a dedicated intercept routine for the INVD intercept. And since
      the instruction is emulated as a NOP, just skip it instead.
      
      Fixes: 1654efcb
      
       ("KVM: SVM: Add KVM_SEV_INIT command")
      Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Message-Id: <a0b9a19ffa7fef86a3cc700c7ea01cb2731e04e5.1600972918.git.thomas.lendacky@amd.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      4bb05f30
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 33d04c66
      Linus Torvalds authored
      Pull rdma fix from Jason Gunthorpe:
       "One fix for a bug that blktests hits when using rxe: tear down the CQ
        pool before waiting for all references to go away"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        RDMA/core: Fix ordering of CQ pool destruction
      33d04c66
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2020-09-25' of git://anongit.freedesktop.org/drm/drm · 574ec42e
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Fairly quiet, a couple of i915 fixes, one dma-buf fix, one vc4 and two
        sun4i changes
      
        dma-buf:
         - Single null pointer deref fix
      
        i915:
         - Fix selftest reference to stack data out of scope
         - Fix GVT null pointer dereference
      
        vc4:
         - fill asoc card owner
      
        sun4i:
         - program secondary CSC correctly"
      
      * tag 'drm-fixes-2020-09-25' of git://anongit.freedesktop.org/drm/drm:
        drm/i915/selftests: Push the fake iommu device from the stack to data
        dmabuf: fix NULL pointer dereference in dma_buf_release()
        drm/i915/gvt: Fix port number for BDW on EDID region setup
        drm/sun4i: mixer: Extend regmap max_register
        drm/sun4i: sun8i-csc: Secondary CSC register correction
        drm/vc4/vc4_hdmi: fill ASoC card owner
      574ec42e
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-cpuidle' · 60407230
      Rafael J. Wysocki authored
      * pm-cpuidle:
        ACPI: processor: Fix build for ARCH_APICTIMER_STOPS_ON_C3 unset
        cpuidle: Drop misleading comments about RCU usage
        cpuidle: psci: Fix suspicious RCU usage
        rcu/tree: Export rcu_idle_{enter,exit} to modules
      60407230
  3. Sep 25, 2020
    • Rafael J. Wysocki's avatar
      Merge tag 'devfreq-fixes-for-5.9-rc7' of... · 1b0e6e26
      Rafael J. Wysocki authored
      Merge tag 'devfreq-fixes-for-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux
      
      Pull devfreq updates for 5.9-rc7 from Chanwoo Choi:
      
      "1. Update devfreq core
        - Add missing timer type to devfreq_summary debugfs node.
      
       2. Fix devfreq device driver
        - Fix the exception handling about clock on tegra30-devfreq.c"
      
      * tag 'devfreq-fixes-for-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux:
        PM / devfreq: tegra30: Disable clock on error in probe
        PM / devfreq: Add timer type to devfreq_summary debugfs
      1b0e6e26
    • Sean Christopherson's avatar
      KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE · 8d214c48
      Sean Christopherson authored
      Reset the MMU context during kvm_set_cr4() if SMAP or PKE is toggled.
      Recent commits to (correctly) not reload PDPTRs when SMAP/PKE are
      toggled inadvertantly skipped the MMU context reset due to the mask
      of bits that triggers PDPTR loads also being used to trigger MMU context
      resets.
      
      Fixes: 427890af ("kvm: x86: Toggling CR4.SMAP does not load PDPTEs in PAE mode")
      Fixes: cb957adb
      
       ("kvm: x86: Toggling CR4.PKE does not load PDPTEs in PAE mode")
      Cc: Jim Mattson <jmattson@google.com>
      Cc: Peter Shier <pshier@google.com>
      Cc: Oliver Upton <oupton@google.com>
      Signed-off-by: default avatarSean Christopherson <sean.j.christopherson@intel.com>
      Message-Id: <20200923215352.17756-1-sean.j.christopherson@intel.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      8d214c48
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2020-09-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · ba78755e
      Dave Airlie authored
      
      
      drm-misc-fixes for v5.9:
      - Single null pointer deref fix for dma-buf.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/4106c21e-f52c-4c05-6cdb-daa743bb8617@linux.intel.com
      ba78755e
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2020-09-24' of... · f3231a02
      Dave Airlie authored
      
      Merge tag 'drm-intel-fixes-2020-09-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.9-rc7:
      - Fix selftest reference to stack data out of scope
      - Fix GVT null pointer dereference
      - Backmerge from Linus' master to fix build
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87zh5fpmha.fsf@intel.com
      f3231a02
    • Dave Airlie's avatar
      BackMerge commit '98477740' into drm-fixes · 720777c5
      Dave Airlie authored
      
      
      The dax mess had some fallout, and i915 used a later base to fix their CI.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      720777c5
    • Maxim Levitsky's avatar
      KVM: x86: fix MSR_IA32_TSC read for nested migration · ee6fa053
      Maxim Levitsky authored
      
      
      MSR reads/writes should always access the L1 state, since the (nested)
      hypervisor should intercept all the msrs it wants to adjust, and these
      that it doesn't should be read by the guest as if the host had read it.
      
      However IA32_TSC is an exception. Even when not intercepted, guest still
      reads the value + TSC offset.
      The write however does not take any TSC offset into account.
      
      This is documented in Intel's SDM and seems also to happen on AMD as well.
      
      This creates a problem when userspace wants to read the IA32_TSC value and then
      write it. (e.g for migration)
      
      In this case it reads L2 value but write is interpreted as an L1 value.
      To fix this make the userspace initiated reads of IA32_TSC return L1 value
      as well.
      
      Huge thanks to Dave Gilbert for helping me understand this very confusing
      semantic of MSR writes.
      
      Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
      Message-Id: <20200921103805.9102-2-mlevitsk@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ee6fa053
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.9-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 171d4ff7
      Linus Torvalds authored
      Pull MMC fix from Ulf Hansson:
       "Fix build warning in mmc_spi when CONFIG_HAS_DMA is unset"
      
      * tag 'mmc-v5.9-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: mmc_spi: Fix mmc_spi_dma_alloc() return type for !HAS_DMA
      171d4ff7
    • Linus Torvalds's avatar
      Merge tag 'media/v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 8fa5960f
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
       - fix a regression at the CEC adapter core
      
       - two uAPI patches (one revert) for changes in this development cycle
      
      * tag 'media/v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
        media: dt-bindings: media: imx274: Convert to json-schema
        media: media/v4l2: remove V4L2_FLAG_MEMORY_NON_CONSISTENT flag
        media: cec-adap.c: don't use flush_scheduled_work()
      8fa5960f
    • Linus Torvalds's avatar
      Merge tag 'sound-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 9ef7dce5
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Just a handful small device-specific fixes including a couple of
        reverts"
      
      * tag 'sound-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        Revert "ALSA: usb-audio: Disable Lenovo P620 Rear line-in volume control"
        Revert "ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO"
        ALSA: usb-audio: Add delay quirk for H570e USB headsets
        ALSA: hda/realtek: Enable front panel headset LED on Lenovo ThinkStation P520
        ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged
        ALSA: asihpi: fix iounmap in error handler
      9ef7dce5
  4. Sep 24, 2020
    • Linus Torvalds's avatar
      mm: fix misplaced unlock_page in do_wp_page() · be068f29
      Linus Torvalds authored
      Commit 09854ba9 ("mm: do_wp_page() simplification") reorganized all
      the code around the page re-use vs copy, but in the process also moved
      the final unlock_page() around to after the wp_page_reuse() call.
      
      That normally doesn't matter - but it means that the unlock_page() is
      now done after releasing the page table lock.  Again, not a big deal,
      you'd think.
      
      But it turns out that it's very wrong indeed, because once we've
      released the page table lock, we've basically lost our only reference to
      the page - the page tables - and it could now be free'd at any time.  We
      do hold the mmap_sem, so no actual unmap() can happen, but madvise can
      come in and a MADV_DONTNEED will zap the page range - and free the page.
      
      So now the page may be free'd just as we're unlocking it, which in turn
      will usually trigger a "Bad page state" error in the freeing path.  To
      make matters more confusing, by the time the debug code prints out the
      page state, the unlock has typically completed and everything looks fine
      again.
      
      This all doesn't happen in any normal situations, but it does trigger
      with the dirtyc0w_child LTP test.  And it seems to trigger much more
      easily (but not expclusively) on s390 than elsewhere, probably because
      s390 doesn't do the "batch pages up for freeing after the TLB flush"
      that gives the unlock_page() more time to complete and makes the race
      harder to hit.
      
      Fixes: 09854ba9
      
       ("mm: do_wp_page() simplification")
      Link: https://lore.kernel.org/lkml/a46e9bbef2ed4e17778f5615e818526ef848d791.camel@redhat.com/
      Link: https://lore.kernel.org/linux-mm/c41149a8-211e-390b-af1d-d5eee690fecb@linux.alibaba.com/
      Reported-by: default avatarQian Cai <cai@redhat.com>
      Reported-by: default avatarAlex Shi <alex.shi@linux.alibaba.com>
      Bisected-and-analyzed-by: default avatarGerald Schaefer <gerald.schaefer@linux.ibm.com>
      Tested-by: default avatarGerald Schaefer <gerald.schaefer@linux.ibm.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      be068f29
    • Ray Jui's avatar
      spi: bcm-qspi: Fix probe regression on iProc platforms · 00fb259c
      Ray Jui authored
      iProc chips have QSPI controller that does not have the MSPI_REV
      offset. Reading from that offset will cause a bus error. Fix it by
      having MSPI_REV query disabled in the generic compatible string.
      
      Fixes: 3a01f04d
      
       ("spi: bcm-qspi: Handle lack of MSPI_REV offset")
      Link: https://lore.kernel.org/linux-arm-kernel/20200909211857.4144718-1-f.fainelli@gmail.com/T/#u
      Signed-off-by: default avatarRay Jui <ray.jui@broadcom.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Link: https://lore.kernel.org/r/20200910152539.45584-3-ray.jui@broadcom.com
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      00fb259c
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.9-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · c9c9e6a4
      Linus Torvalds authored
      Pull bootconfig fixes from Steven Rostedt:
       "A couple of fixes for bootconfig.
      
        Masami discovered two bugs which this fixes and he added tests to
        cover these issues.
      
         - Fix a bug that breaks bootconfig tree nodes
      
         - Fix a bug that does not truncate whitespace properly
      
         - Add tests to cover the above two cases"
      
      * tag 'trace-v5.9-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tools/bootconfig: Add testcase for tailing space
        tools/bootconfig: Add testcases for repeated key with brace
        lib/bootconfig: Fix to remove tailing spaces after value
        lib/bootconfig: Fix a bug of breaking existing tree nodes
      c9c9e6a4
    • Linus Torvalds's avatar
      Merge tag 'for-5.9/dm-fixes-2' of... · a969324f
      Linus Torvalds authored
      Merge tag 'for-5.9/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
      
      Pull device mapper fixes from Mike Snitzer:
      
       - DM core fix for incorrect double bio splitting. Keep "fixing" this
         because past attempts didn't fully appreciate the liability relative
         to recursive bio splitting. This fix limits DM's bio splitting to a
         single method and does _not_ use blk_queue_split() for normal IO.
      
       - DM crypt Documentation updates for features added during 5.9 merge.
      
      * tag 'for-5.9/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm crypt: document encrypted keyring key option
        dm crypt: document new no_workqueue flags
        dm: fix comment in dm_process_bio()
        dm: fix bio splitting and its bio completion order for regular IO
      a969324f
    • Linus Torvalds's avatar
      Merge tag 'for-5.9-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · bffac4b5
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
       "syzkaller started to hit us with reports, here's a fix for one type
        (stack overflow when printing checksums on read error).
      
        The other patch is a fix for sysfs object, we have a test for that and
        it leads to a crash."
      
      * tag 'for-5.9-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: fix put of uninitialized kobject after seed device delete
        btrfs: fix overflow when copying corrupt csums for a message
      bffac4b5
    • Linus Torvalds's avatar
      mm: move the copy_one_pte() pte_present check into the caller · 79a1971c
      Linus Torvalds authored
      
      
      This completes the split of the non-present and present pte cases by
      moving the check for the source pte being present into the single
      caller, which also means that we clearly separate out the very different
      return value case for a non-present pte.
      
      The present pte case currently always succeeds.
      
      This is a pure code re-organization with no semantic change: the intent
      is to make it much easier to add a new return case to the present pte
      case for when we do early COW at page table copy time.
      
      This was split out from the previous commit simply to make it easy to
      visually see that there were no semantic changes from this code
      re-organization.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      79a1971c
    • Linus Torvalds's avatar
      mm: split out the non-present case from copy_one_pte() · df3a57d1
      Linus Torvalds authored
      
      
      This is a purely mechanical split of the copy_one_pte() function.  It's
      not immediately obvious when looking at the diff because of the
      indentation change, but the way to see what is going on in this commit
      is to use the "-w" flag to not show pure whitespace changes, and you see
      how the first part of copy_one_pte() is simply lifted out into a
      separate function.
      
      And since the non-present case is marked unlikely, don't make the new
      function be inlined.  Not that gcc really seems to care, since it looks
      like it will inline it anyway due to the whole "single callsite for
      static function" logic.  In fact, code generation with the function
      split is almost identical to before.  But not marking it inline is the
      right thing to do.
      
      This is pure prep-work and cleanup for subsequent changes.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      df3a57d1
    • Sascha Hauer's avatar
      spi: fsl-dspi: fix use-after-free in remove path · 530b5aff
      Sascha Hauer authored
      
      
      spi_unregister_controller() not only unregisters the controller, but
      also frees the controller. This will free the driver data with it, so
      we must not access it later dspi_remove().
      
      Solve this by allocating the driver data separately from the SPI
      controller.
      
      Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Link: https://lore.kernel.org/r/20200923131026.20707-1-s.hauer@pengutronix.de
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      530b5aff
    • Icenowy Zheng's avatar
      regulator: axp20x: fix LDO2/4 description · fbb5a79d
      Icenowy Zheng authored
      Currently we wrongly set the mask of value of LDO2/4 both to the mask of
      LDO2, and the LDO4 voltage configuration is left untouched. This leads
      to conflict when LDO2/4 are both in use.
      
      Fix this issue by setting different vsel_mask to both regulators.
      
      Fixes: db4a555f
      
       ("regulator: axp20x: use defines for masks")
      Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.io>
      Link: https://lore.kernel.org/r/20200923005142.147135-1-icenowy@aosc.io
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      fbb5a79d
  5. Sep 23, 2020