1. 09 Jul, 2023 11 commits
    • Michael Ellerman's avatar
      powerpc/64s: Fix native_hpte_remove() to be irq-safe · 8bbe9fee
      Michael Ellerman authored
      Lockdep warns that the use of the hpte_lock in native_hpte_remove() is
      not safe against an IRQ coming in:
      
        ================================
        WARNING: inconsistent lock state
        6.4.0-rc2-g0c54f4d30ecc #1 Not tainted
        --------------------------------
        inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
        qemu-system-ppc/93865 [HC0[0]:SC0[0]:HE1:SE1] takes:
        c0000000021f5180 (hpte_lock){+.?.}-{0:0}, at: native_lock_hpte+0x8/0xd0
        {IN-SOFTIRQ-W} state was registered at:
          lock_acquire+0x134/0x3f0
          native_lock_hpte+0x44/0xd0
          native_hpte_insert+0xd4/0x2a0
          __hash_page_64K+0x218/0x4f0
          hash_page_mm+0x464/0x840
          do_hash_fault+0x11c/0x260
          data_access_common_virt+0x210/0x220
          __ip_select_ident+0x140/0x150
          ...
          net_rx_action+0x3bc/0x440
          __do_softirq+0x180/0x534
          ...
          sys_sendmmsg+0x34/0x50
          system_call_exception+0x128/0x320
          system_call_common+0x160/0x2e4
        ...
         Possible unsafe locking scenario:
      
               CPU0
               ----
          lock(hpte_lock);
          <Interrupt>
            lock(hpte_lock);
      
         *** DEADLOCK ***
        ...
        Call Trace:
          dump_stack_lvl+0x98/0xe0 (unreliable)
          print_usage_bug.part.0+0x250/0x278
          mark_lock+0xc9c/0xd30
          __lock_acquire+0x440/0x1ca0
          lock_acquire+0x134/0x3f0
          native_lock_hpte+0x44/0xd0
          native_hpte_remove+0xb0/0x190
          kvmppc_mmu_map_page+0x650/0x698 [kvm_pr]
          kvmppc_handle_pagefault+0x534/0x6e8 [kvm_pr]
          kvmppc_handle_exit_pr+0x6d8/0xe90 [kvm_pr]
          after_sprg3_load+0x80/0x90 [kvm_pr]
          kvmppc_vcpu_run_pr+0x108/0x270 [kvm_pr]
          kvmppc_vcpu_run+0x34/0x48 [kvm]
          kvm_arch_vcpu_ioctl_run+0x340/0x470 [kvm]
          kvm_vcpu_ioctl+0x338/0x8b8 [kvm]
          sys_ioctl+0x7c4/0x13e0
          system_call_exception+0x128/0x320
          system_call_common+0x160/0x2e4
      
      I suspect kvm_pr is the only caller that doesn't already have IRQs
      disabled, which is why this hasn't been reported previously.
      
      Fix it by disabling IRQs in native_hpte_remove().
      
      Fixes: 35159b57 ("powerpc/64s: make HPTE lock and native_tlbie_lock irq-safe")
      Cc: stable@vger.kernel.org # v6.1+
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Link: https://msgid.link/20230517123033.18430-1-mpe@ellerman.id.au
      8bbe9fee
    • Linus Torvalds's avatar
      Linux 6.5-rc1 · 06c2afb8
      Linus Torvalds authored
      06c2afb8
    • Linus Torvalds's avatar
      MAINTAINERS 2: Electric Boogaloo · c192ac73
      Linus Torvalds authored
      We just sorted the entries and fields last release, so just out of a
      perverse sense of curiosity, I decided to see if we can keep things
      ordered for even just one release.
      
      The answer is "No. No we cannot".
      
      I suggest that all kernel developers will need weekly training sessions,
      involving a lot of Big Bird and Sesame Street.  And at the yearly
      maintainer summit, we will all sing the alphabet song together.
      
      I doubt I will keep doing this.  At some point "perverse sense of
      curiosity" turns into just a cold dark place filled with sadness and
      despair.
      
      Repeats: 80e62bc8 ("MAINTAINERS: re-sort all entries and fields")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c192ac73
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-6.5-2023-07-09' of git://git.infradead.org/users/hch/dma-mapping · f71f6421
      Linus Torvalds authored
      Pull dma-mapping fixes from Christoph Hellwig:
      
       - swiotlb area sizing fixes (Petr Tesarik)
      
      * tag 'dma-mapping-6.5-2023-07-09' of git://git.infradead.org/users/hch/dma-mapping:
        swiotlb: reduce the number of areas to match actual memory pool size
        swiotlb: always set the number of areas before allocating the pool
      f71f6421
    • Linus Torvalds's avatar
      Merge tag 'irq_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a9943ad3
      Linus Torvalds authored
      Pull irq update from Borislav Petkov:
      
       - Optimize IRQ domain's name assignment
      
      * tag 'irq_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqdomain: Use return value of strreplace()
      a9943ad3
    • Linus Torvalds's avatar
      Merge tag 'x86_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 51e3d7c2
      Linus Torvalds authored
      Pull x86 fpu fix from Borislav Petkov:
      
       - Do FPU AP initialization on Xen PV too which got missed by the recent
         boot reordering work
      
      * tag 'x86_urgent_for_v6.5_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/xen: Fix secondary processors' FPU initialization
      51e3d7c2
    • Linus Torvalds's avatar
      Merge tag 'x86-core-2023-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · e3da8db0
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "A single fix for the mechanism to park CPUs with an INIT IPI.
      
        On shutdown or kexec, the kernel tries to park the non-boot CPUs with
        an INIT IPI. But the same code path is also used by the crash utility.
        If the CPU which panics is not the boot CPU then it sends an INIT IPI
        to the boot CPU which resets the machine.
      
        Prevent this by validating that the CPU which runs the stop mechanism
        is the boot CPU. If not, leave the other CPUs in HLT"
      
      * tag 'x86-core-2023-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/smp: Don't send INIT to boot CPU
      e3da8db0
    • Linus Torvalds's avatar
      Merge tag 'mips_6.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · 74099e20
      Linus Torvalds authored
      Pull MIPS fixes from Thomas Bogendoerfer:
      
       - fixes for KVM
      
       - fix for loongson build and cpu probing
      
       - DT fixes
      
      * tag 'mips_6.5_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
        MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled
        MIPS: dts: add missing space before {
        MIPS: Loongson: Fix build error when make modules_install
        MIPS: KVM: Fix NULL pointer dereference
        MIPS: Loongson: Fix cpu_probe_loongson() again
      74099e20
    • Linus Torvalds's avatar
      Merge tag 'xfs-6.5-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 76487845
      Linus Torvalds authored
      Pull xfs fix from Darrick Wong:
       "Nothing exciting here, just getting rid of a gcc warning that I got
        tired of seeing when I turn on gcov"
      
      * tag 'xfs-6.5-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: fix uninit warning in xfs_growfs_data
      76487845
    • Linus Torvalds's avatar
      Merge tag '6.5-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · 4770353b
      Linus Torvalds authored
      Pull more smb client updates from Steve French:
      
       - fix potential use after free in unmount
      
       - minor cleanup
      
       - add worker to cleanup stale directory leases
      
      * tag '6.5-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: Add a laundromat thread for cached directories
        smb: client: remove redundant pointer 'server'
        cifs: fix session state transition to avoid use-after-free issue
      4770353b
    • Linus Torvalds's avatar
      Merge tag 'ntb-6.5' of https://github.com/jonmason/ntb · cff06873
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
       "Fixes for pci_clean_master, error handling in driver inits, and
        various other issues/bugs"
      
      * tag 'ntb-6.5' of https://github.com/jonmason/ntb:
        ntb: hw: amd: Fix debugfs_create_dir error checking
        ntb.rst: Fix copy and paste error
        ntb_netdev: Fix module_init problem
        ntb: intel: Remove redundant pci_clear_master
        ntb: epf: Remove redundant pci_clear_master
        ntb_hw_amd: Remove redundant pci_clear_master
        ntb: idt: drop redundant pci_enable_pcie_error_reporting()
        MAINTAINERS: git://github -> https://github.com for jonmason
        NTB: EPF: fix possible memory leak in pci_vntb_probe()
        NTB: ntb_tool: Add check for devm_kcalloc
        NTB: ntb_transport: fix possible memory leak while device_register() fails
        ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
        NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
        ntb: idt: Fix error handling in idt_pci_driver_init()
      cff06873
  2. 08 Jul, 2023 29 commits