1. 18 Oct, 2024 1 commit
  2. 17 Oct, 2024 5 commits
    • Jens Axboe's avatar
      Merge tag 'nvme-6.12-2024-10-18' of git://git.infradead.org/nvme into block-6.12 · de7007e9
      Jens Axboe authored
      Pull NVMe fixes from Keith:
      
      "nvme fixes for Linux 6.12
      
       - Fix target passthrough identifier (Nilay)
       - Fix tcp locking (Hannes)
       - Replace list with sbitmap for tracking RDMA rsp tags (Guixen)
       - Remove unnecessary fallthrough statements (Tokunori)
       - Remove ready-without-media support (Greg)
       - Fix multipath partition scan deadlock (Keith)
       - Fix concurrent PCI reset and remove queue mapping (Maurizio)
       - Fabrics shutdown fixes (Nilay)"
      
      * tag 'nvme-6.12-2024-10-18' of git://git.infradead.org/nvme:
        nvme: use helper nvme_ctrl_state in nvme_keep_alive_finish function
        nvme: make keep-alive synchronous operation
        nvme-loop: flush off pending I/O while shutting down loop controller
        nvme-pci: fix race condition between reset and nvme_dev_disable()
        nvme-multipath: defer partition scanning
        nvme: disable CC.CRIME (NVME_CC_CRIME)
        nvme: delete unnecessary fallthru comment
        nvmet-rdma: use sbitmap to replace rsp free list
        nvme: tcp: avoid race between queue_lock lock and destroy
        nvmet-passthru: clear EUID/NGUID/UUID while using loop target
        block: fix blk_rq_map_integrity_sg kernel-doc
      de7007e9
    • Nilay Shroff's avatar
      nvme: use helper nvme_ctrl_state in nvme_keep_alive_finish function · 599d9f3a
      Nilay Shroff authored
      We no more need acquiring ctrl->lock before accessing the
      NVMe controller state and instead we can now use the helper
      nvme_ctrl_state. So replace the use of ctrl->lock from
      nvme_keep_alive_finish function with nvme_ctrl_state call.
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNilay Shroff <nilay@linux.ibm.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      599d9f3a
    • Nilay Shroff's avatar
      nvme: make keep-alive synchronous operation · d0692367
      Nilay Shroff authored
      The nvme keep-alive operation, which executes at a periodic interval,
      could potentially sneak in while shutting down a fabric controller.
      This may lead to a race between the fabric controller admin queue
      destroy code path (invoked while shutting down controller) and hw/hctx
      queue dispatcher called from the nvme keep-alive async request queuing
      operation. This race could lead to the kernel crash shown below:
      
      Call Trace:
          autoremove_wake_function+0x0/0xbc (unreliable)
          __blk_mq_sched_dispatch_requests+0x114/0x24c
          blk_mq_sched_dispatch_requests+0x44/0x84
          blk_mq_run_hw_queue+0x140/0x220
          nvme_keep_alive_work+0xc8/0x19c [nvme_core]
          process_one_work+0x200/0x4e0
          worker_thread+0x340/0x504
          kthread+0x138/0x140
          start_kernel_thread+0x14/0x18
      
      While shutting down fabric controller, if nvme keep-alive request sneaks
      in then it would be flushed off. The nvme_keep_alive_end_io function is
      then invoked to handle the end of the keep-alive operation which
      decrements the admin->q_usage_counter and assuming this is the last/only
      request in the admin queue then the admin->q_usage_counter becomes zero.
      If that happens then blk-mq destroy queue operation (blk_mq_destroy_
      queue()) which could be potentially running simultaneously on another
      cpu (as this is the controller shutdown code path) would forward
      progress and deletes the admin queue. So, now from this point onward
      we are not supposed to access the admin queue resources. However the
      issue here's that the nvme keep-alive thread running hw/hctx queue
      dispatch operation hasn't yet finished its work and so it could still
      potentially access the admin queue resource while the admin queue had
      been already deleted and that causes the above crash.
      
      This fix helps avoid the observed crash by implementing keep-alive as a
      synchronous operation so that we decrement admin->q_usage_counter only
      after keep-alive command finished its execution and returns the command
      status back up to its caller (blk_execute_rq()). This would ensure that
      fabric shutdown code path doesn't destroy the fabric admin queue until
      keep-alive request finished execution and also keep-alive thread is not
      running hw/hctx queue dispatch operation.
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNilay Shroff <nilay@linux.ibm.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      d0692367
    • Nilay Shroff's avatar
      nvme-loop: flush off pending I/O while shutting down loop controller · c199fac8
      Nilay Shroff authored
      While shutting down loop controller, we first quiesce the admin/IO queue,
      delete the admin/IO tag-set and then at last destroy the admin/IO queue.
      However it's quite possible that during the window between quiescing and
      destroying of the admin/IO queue, some admin/IO request might sneak in
      and if that happens then we could potentially encounter a hung task
      because shutdown operation can't forward progress until any pending I/O
      is flushed off.
      
      This commit helps ensure that before destroying the admin/IO queue, we
      unquiesce the admin/IO queue so that any outstanding requests, which are
      added after the admin/IO queue is quiesced, are now flushed to its
      completion.
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNilay Shroff <nilay@linux.ibm.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      c199fac8
    • Maurizio Lombardi's avatar
      nvme-pci: fix race condition between reset and nvme_dev_disable() · 26bc0a81
      Maurizio Lombardi authored
      nvme_dev_disable() modifies the dev->online_queues field, therefore
      nvme_pci_update_nr_queues() should avoid racing against it, otherwise
      we could end up passing invalid values to blk_mq_update_nr_hw_queues().
      
       WARNING: CPU: 39 PID: 61303 at drivers/pci/msi/api.c:347
                pci_irq_get_affinity+0x187/0x210
       Workqueue: nvme-reset-wq nvme_reset_work [nvme]
       RIP: 0010:pci_irq_get_affinity+0x187/0x210
       Call Trace:
        <TASK>
        ? blk_mq_pci_map_queues+0x87/0x3c0
        ? pci_irq_get_affinity+0x187/0x210
        blk_mq_pci_map_queues+0x87/0x3c0
        nvme_pci_map_queues+0x189/0x460 [nvme]
        blk_mq_update_nr_hw_queues+0x2a/0x40
        nvme_reset_work+0x1be/0x2a0 [nvme]
      
      Fix the bug by locking the shutdown_lock mutex before using
      dev->online_queues. Give up if nvme_dev_disable() is running or if
      it has been executed already.
      
      Fixes: 949928c1 ("NVMe: Fix possible queue use after freed")
      Tested-by: default avatarYi Zhang <yi.zhang@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarMaurizio Lombardi <mlombard@redhat.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      26bc0a81
  3. 16 Oct, 2024 2 commits
    • Ming Lei's avatar
      ublk: don't allow user copy for unprivileged device · 42aafd8b
      Ming Lei authored
      UBLK_F_USER_COPY requires userspace to call write() on ublk char
      device for filling request buffer, and unprivileged device can't
      be trusted.
      
      So don't allow user copy for unprivileged device.
      
      Cc: stable@vger.kernel.org
      Fixes: 1172d5b8 ("ublk: support user copy")
      Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20241016134847.2911721-1-ming.lei@redhat.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      42aafd8b
    • Omar Sandoval's avatar
      blk-rq-qos: fix crash on rq_qos_wait vs. rq_qos_wake_function race · e972b08b
      Omar Sandoval authored
      We're seeing crashes from rq_qos_wake_function that look like this:
      
        BUG: unable to handle page fault for address: ffffafe180a40084
        #PF: supervisor write access in kernel mode
        #PF: error_code(0x0002) - not-present page
        PGD 100000067 P4D 100000067 PUD 10027c067 PMD 10115d067 PTE 0
        Oops: Oops: 0002 [#1] PREEMPT SMP PTI
        CPU: 17 UID: 0 PID: 0 Comm: swapper/17 Not tainted 6.12.0-rc3-00013-geca631b8 #11
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
        RIP: 0010:_raw_spin_lock_irqsave+0x1d/0x40
        Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 0f 1f 44 00 00 41 54 9c 41 5c fa 65 ff 05 62 97 30 4c 31 c0 ba 01 00 00 00 <f0> 0f b1 17 75 0a 4c 89 e0 41 5c c3 cc cc cc cc 89 c6 e8 2c 0b 00
        RSP: 0018:ffffafe180580ca0 EFLAGS: 00010046
        RAX: 0000000000000000 RBX: ffffafe180a3f7a8 RCX: 0000000000000011
        RDX: 0000000000000001 RSI: 0000000000000003 RDI: ffffafe180a40084
        RBP: 0000000000000000 R08: 00000000001e7240 R09: 0000000000000011
        R10: 0000000000000028 R11: 0000000000000888 R12: 0000000000000002
        R13: ffffafe180a40084 R14: 0000000000000000 R15: 0000000000000003
        FS:  0000000000000000(0000) GS:ffff9aaf1f280000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: ffffafe180a40084 CR3: 000000010e428002 CR4: 0000000000770ef0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        PKRU: 55555554
        Call Trace:
         <IRQ>
         try_to_wake_up+0x5a/0x6a0
         rq_qos_wake_function+0x71/0x80
         __wake_up_common+0x75/0xa0
         __wake_up+0x36/0x60
         scale_up.part.0+0x50/0x110
         wb_timer_fn+0x227/0x450
         ...
      
      So rq_qos_wake_function() calls wake_up_process(data->task), which calls
      try_to_wake_up(), which faults in raw_spin_lock_irqsave(&p->pi_lock).
      
      p comes from data->task, and data comes from the waitqueue entry, which
      is stored on the waiter's stack in rq_qos_wait(). Analyzing the core
      dump with drgn, I found that the waiter had already woken up and moved
      on to a completely unrelated code path, clobbering what was previously
      data->task. Meanwhile, the waker was passing the clobbered garbage in
      data->task to wake_up_process(), leading to the crash.
      
      What's happening is that in between rq_qos_wake_function() deleting the
      waitqueue entry and calling wake_up_process(), rq_qos_wait() is finding
      that it already got a token and returning. The race looks like this:
      
      rq_qos_wait()                           rq_qos_wake_function()
      ==============================================================
      prepare_to_wait_exclusive()
                                              data->got_token = true;
                                              list_del_init(&curr->entry);
      if (data.got_token)
              break;
      finish_wait(&rqw->wait, &data.wq);
        ^- returns immediately because
           list_empty_careful(&wq_entry->entry)
           is true
      ... return, go do something else ...
                                              wake_up_process(data->task)
                                                (NO LONGER VALID!)-^
      
      Normally, finish_wait() is supposed to synchronize against the waker.
      But, as noted above, it is returning immediately because the waitqueue
      entry has already been removed from the waitqueue.
      
      The bug is that rq_qos_wake_function() is accessing the waitqueue entry
      AFTER deleting it. Note that autoremove_wake_function() wakes the waiter
      and THEN deletes the waitqueue entry, which is the proper order.
      
      Fix it by swapping the order. We also need to use
      list_del_init_careful() to match the list_empty_careful() in
      finish_wait().
      
      Fixes: 38cfb5a4 ("blk-wbt: improve waking of tasks")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
      Acked-by: default avatarTejun Heo <tj@kernel.org>
      Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
      Link: https://lore.kernel.org/r/d3bee2463a67b1ee597211823bf7ad3721c26e41.1729014591.git.osandov@fb.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      e972b08b
  4. 15 Oct, 2024 1 commit
  5. 14 Oct, 2024 1 commit
  6. 11 Oct, 2024 3 commits
  7. 09 Oct, 2024 1 commit
  8. 08 Oct, 2024 2 commits
  9. 07 Oct, 2024 1 commit
  10. 03 Oct, 2024 1 commit
    • Hannes Reinecke's avatar
      nvme: tcp: avoid race between queue_lock lock and destroy · 782373ba
      Hannes Reinecke authored
      Commit 76d54bf2 ("nvme-tcp: don't access released socket during
      error recovery") added a mutex_lock() call for the queue->queue_lock
      in nvme_tcp_get_address(). However, the mutex_lock() races with
      mutex_destroy() in nvme_tcp_free_queue(), and causes the WARN below.
      
      DEBUG_LOCKS_WARN_ON(lock->magic != lock)
      WARNING: CPU: 3 PID: 34077 at kernel/locking/mutex.c:587 __mutex_lock+0xcf0/0x1220
      Modules linked in: nvmet_tcp nvmet nvme_tcp nvme_fabrics iw_cm ib_cm ib_core pktcdvd nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set nf_tables qrtr sunrpc ppdev 9pnet_virtio 9pnet pcspkr netfs parport_pc parport e1000 i2c_piix4 i2c_smbus loop fuse nfnetlink zram bochs drm_vram_helper drm_ttm_helper ttm drm_kms_helper xfs drm sym53c8xx floppy nvme scsi_transport_spi nvme_core nvme_auth serio_raw ata_generic pata_acpi dm_multipath qemu_fw_cfg [last unloaded: ib_uverbs]
      CPU: 3 UID: 0 PID: 34077 Comm: udisksd Not tainted 6.11.0-rc7 #319
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-2.fc40 04/01/2014
      RIP: 0010:__mutex_lock+0xcf0/0x1220
      Code: 08 84 d2 0f 85 c8 04 00 00 8b 15 ef b6 c8 01 85 d2 0f 85 78 f4 ff ff 48 c7 c6 20 93 ee af 48 c7 c7 60 91 ee af e8 f0 a7 6d fd <0f> 0b e9 5e f4 ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 f2 48 c1
      RSP: 0018:ffff88811305f760 EFLAGS: 00010286
      RAX: 0000000000000000 RBX: ffff88812c652058 RCX: 0000000000000000
      RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001
      RBP: ffff88811305f8b0 R08: 0000000000000001 R09: ffffed1075c36341
      R10: ffff8883ae1b1a0b R11: 0000000000010498 R12: 0000000000000000
      R13: 0000000000000000 R14: dffffc0000000000 R15: ffff88812c652058
      FS:  00007f9713ae4980(0000) GS:ffff8883ae180000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007fcd78483c7c CR3: 0000000122c38000 CR4: 00000000000006f0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
       <TASK>
       ? __warn.cold+0x5b/0x1af
       ? __mutex_lock+0xcf0/0x1220
       ? report_bug+0x1ec/0x390
       ? handle_bug+0x3c/0x80
       ? exc_invalid_op+0x13/0x40
       ? asm_exc_invalid_op+0x16/0x20
       ? __mutex_lock+0xcf0/0x1220
       ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp]
       ? __pfx___mutex_lock+0x10/0x10
       ? __lock_acquire+0xd6a/0x59e0
       ? nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp]
       nvme_tcp_get_address+0xc2/0x1e0 [nvme_tcp]
       ? __pfx_nvme_tcp_get_address+0x10/0x10 [nvme_tcp]
       nvme_sysfs_show_address+0x81/0xc0 [nvme_core]
       dev_attr_show+0x42/0x80
       ? __asan_memset+0x1f/0x40
       sysfs_kf_seq_show+0x1f0/0x370
       seq_read_iter+0x2cb/0x1130
       ? rw_verify_area+0x3b1/0x590
       ? __mutex_lock+0x433/0x1220
       vfs_read+0x6a6/0xa20
       ? lockdep_hardirqs_on+0x78/0x100
       ? __pfx_vfs_read+0x10/0x10
       ksys_read+0xf7/0x1d0
       ? __pfx_ksys_read+0x10/0x10
       ? __x64_sys_openat+0x105/0x1d0
       do_syscall_64+0x93/0x180
       ? lockdep_hardirqs_on_prepare+0x16d/0x400
       ? do_syscall_64+0x9f/0x180
       ? lockdep_hardirqs_on+0x78/0x100
       ? do_syscall_64+0x9f/0x180
       ? __pfx_ksys_read+0x10/0x10
       ? lockdep_hardirqs_on_prepare+0x16d/0x400
       ? do_syscall_64+0x9f/0x180
       ? lockdep_hardirqs_on+0x78/0x100
       ? do_syscall_64+0x9f/0x180
       ? lockdep_hardirqs_on_prepare+0x16d/0x400
       ? do_syscall_64+0x9f/0x180
       ? lockdep_hardirqs_on+0x78/0x100
       ? do_syscall_64+0x9f/0x180
       ? lockdep_hardirqs_on_prepare+0x16d/0x400
       ? do_syscall_64+0x9f/0x180
       ? lockdep_hardirqs_on+0x78/0x100
       ? do_syscall_64+0x9f/0x180
       ? lockdep_hardirqs_on_prepare+0x16d/0x400
       ? do_syscall_64+0x9f/0x180
       ? lockdep_hardirqs_on+0x78/0x100
       ? do_syscall_64+0x9f/0x180
       ? do_syscall_64+0x9f/0x180
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
      RIP: 0033:0x7f9713f55cfa
      Code: 55 48 89 e5 48 83 ec 20 48 89 55 e8 48 89 75 f0 89 7d f8 e8 e8 74 f8 ff 48 8b 55 e8 48 8b 75 f0 41 89 c0 8b 7d f8 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 2e 44 89 c7 48 89 45 f8 e8 42 75 f8 ff 48 8b
      RSP: 002b:00007ffd7f512e70 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
      RAX: ffffffffffffffda RBX: 000055c38f316859 RCX: 00007f9713f55cfa
      RDX: 0000000000000fff RSI: 00007ffd7f512eb0 RDI: 0000000000000011
      RBP: 00007ffd7f512e90 R08: 0000000000000000 R09: 00000000ffffffff
      R10: 0000000000000000 R11: 0000000000000246 R12: 000055c38f317148
      R13: 0000000000000000 R14: 00007f96f4004f30 R15: 000055c3b6b623c0
       </TASK>
      
      The WARN is observed when the blktests test case nvme/014 is repeated
      with tcp transport. It is rare, and 200 times repeat is required to
      recreate in some test environments.
      
      To avoid the WARN, check the NVME_TCP_Q_LIVE flag before locking
      queue->queue_lock. The flag is cleared long time before the lock gets
      destroyed.
      Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
      Signed-off-by: default avatarShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      782373ba
  11. 02 Oct, 2024 3 commits
  12. 01 Oct, 2024 1 commit
    • Nilay Shroff's avatar
      nvmet-passthru: clear EUID/NGUID/UUID while using loop target · e38dad43
      Nilay Shroff authored
      When nvme passthru is configured using loop target, the clear_ids
      attribute is, by default, set to true. This attribute would ensure that
      EUID/NGUID/UUID is cleared for the loop passthru target.
      
      The newer NVMe disk supporting the NVMe spec 1.3 or higher, typically,
      implements the support for "Namespace Identification Descriptor list"
      command. This command when issued from host returns EUID/NGUID/UUID
      assigned to the inquired namespace. Not clearing these values, while
      using nvme passthru using loop target, would result in NVMe host driver
      rejecting the namespace. This check was implemented in the commit
      2079f41e ("nvme: check that EUI/GUID/UUID are globally unique").
      
      The fix implemented in this commit ensure that when host issues ns-id
      descriptor list command, the EUID/NGUID/UUID are cleared by passthru
      target. In fact, the function nvmet_passthru_override_id_descs() which
      clears those unique ids already exits, so we just need to ensure that
      ns-id descriptor list command falls through the corretc code path. And
      while we're at it, we also combines the three passthru admin command
      cases together which shares the same code.
      Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNilay Shroff <nilay@linux.ibm.com>
      Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
      e38dad43
  13. 29 Sep, 2024 12 commits
    • Linus Torvalds's avatar
      Linux 6.12-rc1 · 9852d85e
      Linus Torvalds authored
      9852d85e
    • Linus Torvalds's avatar
      x86: kvm: fix build error · 3f749bef
      Linus Torvalds authored
      The cpu_emergency_register_virt_callback() function is used
      unconditionally by the x86 kvm code, but it is declared (and defined)
      conditionally:
      
        #if IS_ENABLED(CONFIG_KVM_INTEL) || IS_ENABLED(CONFIG_KVM_AMD)
        void cpu_emergency_register_virt_callback(cpu_emergency_virt_cb *callback);
        ...
      
      leading to a build error when neither KVM_INTEL nor KVM_AMD support is
      enabled:
      
        arch/x86/kvm/x86.c: In function ‘kvm_arch_enable_virtualization’:
        arch/x86/kvm/x86.c:12517:9: error: implicit declaration of function ‘cpu_emergency_register_virt_callback’ [-Wimplicit-function-declaration]
        12517 |         cpu_emergency_register_virt_callback(kvm_x86_ops.emergency_disable_virtualization_cpu);
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        arch/x86/kvm/x86.c: In function ‘kvm_arch_disable_virtualization’:
        arch/x86/kvm/x86.c:12522:9: error: implicit declaration of function ‘cpu_emergency_unregister_virt_callback’ [-Wimplicit-function-declaration]
        12522 |         cpu_emergency_unregister_virt_callback(kvm_x86_ops.emergency_disable_virtualization_cpu);
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Fix the build by defining empty helper functions the same way the old
      cpu_emergency_disable_virtualization() function was dealt with for the
      same situation.
      
      Maybe we could instead have made the call sites conditional, since the
      callers (kvm_arch_{en,dis}able_virtualization()) have an empty weak
      fallback.  I'll leave that to the kvm people to argue about, this at
      least gets the build going for that particular config.
      
      Fixes: 590b09b1 ("KVM: x86: Register "emergency disable" callbacks when virt is enabled")
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Sean Christopherson <seanjc@google.com>
      Cc: Kai Huang <kai.huang@intel.com>
      Cc: Chao Gao <chao.gao@intel.com>
      Cc: Farrah Chen <farrah.chen@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3f749bef
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox · e7ed3436
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - fix kconfig dependencies (mhu-v3, omap2+)
      
       - use devie name instead of genereic imx_mu_chan as interrupt name
         (imx)
      
       - enable sa8255p and qcs8300 ipc controllers (qcom)
      
       - Fix timeout during suspend mode (bcm2835)
      
       - convert to use use of_property_match_string (mailbox)
      
       - enable mt8188 (mediatek)
      
       - use devm_clk_get_enabled helpers (spreadtrum)
      
       - fix device-id typo (rockchip)
      
      * tag 'mailbox-v6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox:
        mailbox, remoteproc: omap2+: fix compile testing
        dt-bindings: mailbox: qcom-ipcc: Document QCS8300 IPCC
        dt-bindings: mailbox: qcom-ipcc: document the support for SA8255p
        dt-bindings: mailbox: mtk,adsp-mbox: Add compatible for MT8188
        mailbox: Use of_property_match_string() instead of open-coding
        mailbox: bcm2835: Fix timeout during suspend mode
        mailbox: sprd: Use devm_clk_get_enabled() helpers
        mailbox: rockchip: fix a typo in module autoloading
        mailbox: imx: use device name in interrupt name
        mailbox: ARM_MHU_V3 should depend on ARM64
      e7ed3436
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.12-rc1-additional_fixes' of... · 907537f5
      Linus Torvalds authored
      Merge tag 'i2c-for-6.12-rc1-additional_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
      
      Pull i2c fixes from Wolfram Sang:
      
       - fix DesignWare driver ENABLE-ABORT sequence, ensuring ABORT can
         always be sent when needed
      
       - check for PCLK in the SynQuacer controller as an optional clock,
         allowing ACPI to directly provide the clock rate
      
       - KEBA driver Kconfig dependency fix
      
       - fix XIIC driver power suspend sequence
      
      * tag 'i2c-for-6.12-rc1-additional_fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: xiic: Fix pm_runtime_set_suspended() with runtime pm enabled
        i2c: keba: I2C_KEBA should depend on KEBA_CP500
        i2c: synquacer: Deal with optional PCLK correctly
        i2c: designware: fix controller is holding SCL low while ENABLE bit is disabled
      907537f5
    • Linus Torvalds's avatar
      Merge tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma-mapping · b81b78da
      Linus Torvalds authored
      Pull dma-mapping fix from Christoph Hellwig:
      
       - handle chained SGLs in the new tracing code (Christoph Hellwig)
      
      * tag 'dma-mapping-6.12-2024-09-29' of git://git.infradead.org/users/hch/dma-mapping:
        dma-mapping: fix DMA API tracing for chained scatterlists
      b81b78da
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 3ed7df08
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "These are mostly minor updates.
      
        There are two drivers (lpfc and mpi3mr) which missed the initial
        pull and a core change to retry a start/stop unit which affect
        suspend/resume"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (32 commits)
        scsi: lpfc: Update lpfc version to 14.4.0.5
        scsi: lpfc: Support loopback tests with VMID enabled
        scsi: lpfc: Revise TRACE_EVENT log flag severities from KERN_ERR to KERN_WARNING
        scsi: lpfc: Ensure DA_ID handling completion before deleting an NPIV instance
        scsi: lpfc: Fix kref imbalance on fabric ndlps from dev_loss_tmo handler
        scsi: lpfc: Restrict support for 32 byte CDBs to specific HBAs
        scsi: lpfc: Update phba link state conditional before sending CMF_SYNC_WQE
        scsi: lpfc: Add ELS_RSP cmd to the list of WQEs to flush in lpfc_els_flush_cmd()
        scsi: mpi3mr: Update driver version to 8.12.0.0.50
        scsi: mpi3mr: Improve wait logic while controller transitions to READY state
        scsi: mpi3mr: Update MPI Headers to revision 34
        scsi: mpi3mr: Use firmware-provided timestamp update interval
        scsi: mpi3mr: Enhance the Enable Controller retry logic
        scsi: sd: Fix off-by-one error in sd_read_block_characteristics()
        scsi: pm8001: Do not overwrite PCI queue mapping
        scsi: scsi_debug: Remove a useless memset()
        scsi: pmcraid: Convert comma to semicolon
        scsi: sd: Retry START STOP UNIT commands
        scsi: mpi3mr: A performance fix
        scsi: ufs: qcom: Update MODE_MAX cfg_bw value
        ...
      3ed7df08
    • Linus Torvalds's avatar
      Merge tag 'bcachefs-2024-09-28' of git://evilpiepirate.org/bcachefs · 9f9a5347
      Linus Torvalds authored
      Pull more bcachefs updates from Kent Overstreet:
       "Assorted minor syzbot fixes, and for bigger stuff:
      
        Fix two disk accounting rewrite bugs:
      
         - Disk accounting keys use the version field of bkey so that journal
           replay can tell which updates have been applied to the btree.
      
           This is set in the transaction commit path, after we've gotten our
           journal reservation (and our time ordering), but the
           BCH_TRANS_COMMIT_skip_accounting_apply flag that journal replay
           uses was incorrectly skipping this for new updates generated prior
           to journal replay.
      
           This fixes the underlying cause of an assertion pop in
           disk_accounting_read.
      
         - A couple of fixes for disk accounting + device removal.
      
           Checking if acocunting replicas entries were marked in the
           superblock was being done at the wrong point, when deltas in the
           journal could still zero them out, and then additionally we'd try
           to add a missing replicas entry to the superblock without checking
           if it referred to an invalid (removed) device.
      
        A whole slew of repair fixes:
      
         - fix infinite loop in propagate_key_to_snapshot_leaves(), this fixes
           an infinite loop when repairing a filesystem with many snapshots
      
         - fix incorrect transaction restart handling leading to occasional
           "fsck counted ..." warnings
      
         - fix warning in __bch2_fsck_err() for bkey fsck errors
      
         - check_inode() in fsck now correctly checks if the filesystem was
           clean
      
         - there shouldn't be pending logged ops if the fs was clean, we now
           check for this
      
         - remove_backpointer() doesn't remove a dirent that doesn't actually
           point to the inode
      
         - many more fsck errors are AUTOFIX"
      
      * tag 'bcachefs-2024-09-28' of git://evilpiepirate.org/bcachefs: (35 commits)
        bcachefs: check_subvol_path() now prints subvol root inode
        bcachefs: remove_backpointer() now checks if dirent points to inode
        bcachefs: dirent_points_to_inode() now warns on mismatch
        bcachefs: Fix lost wake up
        bcachefs: Check for logged ops when clean
        bcachefs: BCH_FS_clean_recovery
        bcachefs: Convert disk accounting BUG_ON() to WARN_ON()
        bcachefs: Fix BCH_TRANS_COMMIT_skip_accounting_apply
        bcachefs: Check for accounting keys with bversion=0
        bcachefs: rename version -> bversion
        bcachefs: Don't delete unlinked inodes before logged op resume
        bcachefs: Fix BCH_SB_ERRS() so we can reorder
        bcachefs: Fix fsck warnings from bkey validation
        bcachefs: Move transaction commit path validation to as late as possible
        bcachefs: Fix disk accounting attempting to mark invalid replicas entry
        bcachefs: Fix unlocked access to c->disk_sb.sb in bch2_replicas_entry_validate()
        bcachefs: Fix accounting read + device removal
        bcachefs: bch_accounting_mode
        bcachefs: fix transaction restart handling in check_extents(), check_dirents()
        bcachefs: kill inode_walker_entry.seen_this_pos
        ...
      9f9a5347
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d37421e6
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Fix TDX MMIO #VE fault handling, and add two new Intel model numbers
        for 'Pantherlake' and 'Diamond Rapids'"
      
      * tag 'x86-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/cpu: Add two Intel CPU model numbers
        x86/tdx: Fix "in-kernel MMIO" check
      d37421e6
    • Linus Torvalds's avatar
      Merge tag 'locking-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ec03de73
      Linus Torvalds authored
      Pull locking updates from Ingo Molnar:
       "lockdep:
          - Fix potential deadlock between lockdep and RCU (Zhiguo Niu)
          - Use str_plural() to address Coccinelle warning (Thorsten Blum)
          - Add debuggability enhancement (Luis Claudio R. Goncalves)
      
        static keys & calls:
          - Fix static_key_slow_dec() yet again (Peter Zijlstra)
          - Handle module init failure correctly in static_call_del_module()
            (Thomas Gleixner)
          - Replace pointless WARN_ON() in static_call_module_notify() (Thomas
            Gleixner)
      
        <linux/cleanup.h>:
          - Add usage and style documentation (Dan Williams)
      
        rwsems:
          - Move is_rwsem_reader_owned() and rwsem_owner() under
            CONFIG_DEBUG_RWSEMS (Waiman Long)
      
        atomic ops, x86:
          - Redeclare x86_32 arch_atomic64_{add,sub}() as void (Uros Bizjak)
          - Introduce the read64_nonatomic macro to x86_32 with cx8 (Uros
            Bizjak)"
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      
      * tag 'locking-urgent-2024-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        locking/rwsem: Move is_rwsem_reader_owned() and rwsem_owner() under CONFIG_DEBUG_RWSEMS
        jump_label: Fix static_key_slow_dec() yet again
        static_call: Replace pointless WARN_ON() in static_call_module_notify()
        static_call: Handle module init failure correctly in static_call_del_module()
        locking/lockdep: Simplify character output in seq_line()
        lockdep: fix deadlock issue between lockdep and rcu
        lockdep: Use str_plural() to fix Coccinelle warning
        cleanup: Add usage and style documentation
        lockdep: suggest the fix for "lockdep bfs error:-1" on print_bfs_bug
        locking/atomic/x86: Redeclare x86_32 arch_atomic64_{add,sub}() as void
        locking/atomic/x86: Introduce the read64_nonatomic macro to x86_32 with cx8
      ec03de73
    • Linus Torvalds's avatar
      Merge tag 'cocci-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux · 68e4b0e0
      Linus Torvalds authored
      Pull coccinelle updates from Julia Lawall:
       "Extend string_choices.cocci to use more available helpers
      
        Ten patches from Hongbo Li extending string_choices.cocci with the
        complete set of functions offered by include/linux/string_choices.h.
      
        One patch from myself reducing the number of redundant cases that are
        checked by Coccinelle, giving a small performance improvement"
      
      * tag 'cocci-for-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux:
        Reduce Coccinelle choices in string_choices.cocci
        coccinelle: Remove unnecessary parentheses for only one possible change.
        coccinelle: Add rules to find str_yes_no() replacements
        coccinelle: Add rules to find str_on_off() replacements
        coccinelle: Add rules to find str_write_read() replacements
        coccinelle: Add rules to find str_read_write() replacements
        coccinelle: Add rules to find str_enable{d}_disable{d}() replacements
        coccinelle: Add rules to find str_lo{w}_hi{gh}() replacements
        coccinelle: Add rules to find str_hi{gh}_lo{w}() replacements
        coccinelle: Add rules to find str_false_true() replacements
        coccinelle: Add rules to find str_true_false() replacements
      68e4b0e0
    • Linus Torvalds's avatar
      Merge tag 'linux_kselftest-next-6.12-rc1-fixes' of... · e7ebdb51
      Linus Torvalds authored
      Merge tag 'linux_kselftest-next-6.12-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fix from Shuah Khan:
       "One urgent fix to vDSO as automated testing is failing due to this
        bug"
      
      * tag 'linux_kselftest-next-6.12-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: vDSO: align stack for O2-optimized memcpy
      e7ebdb51
    • Ingo Molnar's avatar
      Merge branch 'locking/core' into locking/urgent, to pick up pending commits · ae39e0bd
      Ingo Molnar authored
      Merge all pending locking commits into a single branch.
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ae39e0bd
  14. 28 Sep, 2024 6 commits