[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <169822161706.2969904.18279817075628417467.b4-ty@kernel.org>
Date: Wed, 25 Oct 2023 11:13:37 +0300
From: Leon Romanovsky <leon@...nel.org>
To: dennis.dalessandro@...nelisnetworks.com, jgg@...pe.ca,
dean.luick@...nelisnetworks.com,
Chengfeng Ye <dg573847474@...il.com>
Cc: linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] IB/hfi1: Fix potential deadlock on &irq_src_lock and
&dd->uctxt_lock
On Tue, 26 Sep 2023 10:11:16 +0000, Chengfeng Ye wrote:
> handle_receive_interrupt_napi_sp() running inside interrupt handler
> could introduce inverse lock ordering between &dd->irq_src_lock
> and &dd->uctxt_lock, if read_mod_write() is preempted by the isr.
>
> [CPU0] | [CPU1]
> hfi1_ipoib_dev_open() |
> --> hfi1_netdev_enable_queues() |
> --> enable_queues(rx) |
> --> hfi1_rcvctrl() |
> --> set_intr_bits() |
> --> read_mod_write() |
> --> spin_lock(&dd->irq_src_lock) |
> | hfi1_poll()
> | --> poll_next()
> | --> spin_lock_irq(&dd->uctxt_lock)
> |
> | --> hfi1_rcvctrl()
> | --> set_intr_bits()
> | --> read_mod_write()
> | --> spin_lock(&dd->irq_src_lock)
> <interrupt> |
> --> handle_receive_interrupt_napi_sp() |
> --> set_all_fastpath() |
> --> hfi1_rcd_get_by_index() |
> --> spin_lock_irqsave(&dd->uctxt_lock) |
>
> [...]
Applied, thanks!
[1/1] IB/hfi1: Fix potential deadlock on &irq_src_lock and &dd->uctxt_lock
https://git.kernel.org/rdma/rdma/c/2f19c4b8395ccb
Best regards,
--
Leon Romanovsky <leon@...nel.org>
Powered by blists - more mailing lists