Re: [PATCH v2] scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
From: Martin K. Petersen
Date: Thu Aug 24 2023 - 21:14:38 EST
On Thu, 17 Aug 2023 07:47:08 +0000, Chengfeng Ye wrote:
> There is a long call chain that &fip->ctlr_lock is acquired by isr
> fnic_isr_msix_wq_copy() under hard irq context. Thus other process
> context code acquiring the lock should disable irq, otherwise
> deadlock could happen if the irq preempt the execution while the
> lock is held in process context on the same CPU.
>
> [ISR]
> fnic_isr_msix_wq_copy()
> -> fnic_wq_copy_cmpl_handler()
> -> fnic_fcpio_cmpl_handler()
> -> fnic_fcpio_flogi_reg_cmpl_handler()
> -> fnic_flush_tx()
> -> fnic_send_frame()
> -> fcoe_ctlr_els_send()
> -> spin_lock_bh(&fip->ctlr_lock)
>
> [...]
Applied to 6.6/scsi-queue, thanks!
[1/1] scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
https://git.kernel.org/mkp/scsi/c/1a1975551943
--
Martin K. Petersen Oracle Linux Engineering