* [PATCH] qedr: Remove unnecessary synchronize_irq() before free_irq()
@ 2022-05-13 8:16 cgel.zte
2022-05-15 10:12 ` [EXT] " Michal Kalderon
2022-05-17 11:54 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-05-13 8:16 UTC (permalink / raw)
To: mkalderon
Cc: aelior, jgg, leon, linux-rdma, linux-kernel, Minghao Chi, Zeal Robot
From: Minghao Chi <chi.minghao@zte.com.cn>
Calling synchronize_irq() right before free_irq() is quite useless. On one
hand the IRQ can easily fire again before free_irq() is entered, on the
other hand free_irq() itself calls synchronize_irq() internally (in a race
condition free way), before any state associated with the IRQ is freed.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
drivers/infiniband/hw/qedr/main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c
index 65ce6d0f1885..5152f10d2e6d 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -500,7 +500,6 @@ static void qedr_sync_free_irqs(struct qedr_dev *dev)
if (dev->int_info.msix_cnt) {
idx = i * dev->num_hwfns + dev->affin_hwfn_idx;
vector = dev->int_info.msix[idx].vector;
- synchronize_irq(vector);
free_irq(vector, &dev->cnq_array[i]);
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [EXT] [PATCH] qedr: Remove unnecessary synchronize_irq() before free_irq()
2022-05-13 8:16 [PATCH] qedr: Remove unnecessary synchronize_irq() before free_irq() cgel.zte
@ 2022-05-15 10:12 ` Michal Kalderon
2022-05-17 11:54 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Michal Kalderon @ 2022-05-15 10:12 UTC (permalink / raw)
To: cgel.zte
Cc: Ariel Elior, jgg, leon, linux-rdma, linux-kernel, Minghao Chi,
Zeal Robot
> -----Original Message-----
> From: cgel.zte@gmail.com <cgel.zte@gmail.com>
> Sent: Friday, May 13, 2022 11:17 AM
> To: Michal Kalderon <mkalderon@marvell.com>
> Cc: Ariel Elior <aelior@marvell.com>; jgg@ziepe.ca; leon@kernel.org; linux-
> rdma@vger.kernel.org; linux-kernel@vger.kernel.org; Minghao Chi
> <chi.minghao@zte.com.cn>; Zeal Robot <zealci@zte.com.cn>
> Subject: [EXT] [PATCH] qedr: Remove unnecessary synchronize_irq() before
> free_irq()
>
> External Email
>
> ----------------------------------------------------------------------
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Calling synchronize_irq() right before free_irq() is quite useless. On one
> hand the IRQ can easily fire again before free_irq() is entered, on the
> other hand free_irq() itself calls synchronize_irq() internally (in a race
> condition free way), before any state associated with the IRQ is freed.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
> drivers/infiniband/hw/qedr/main.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/qedr/main.c
> b/drivers/infiniband/hw/qedr/main.c
> index 65ce6d0f1885..5152f10d2e6d 100644
> --- a/drivers/infiniband/hw/qedr/main.c
> +++ b/drivers/infiniband/hw/qedr/main.c
> @@ -500,7 +500,6 @@ static void qedr_sync_free_irqs(struct qedr_dev
> *dev)
> if (dev->int_info.msix_cnt) {
> idx = i * dev->num_hwfns + dev->affin_hwfn_idx;
> vector = dev->int_info.msix[idx].vector;
> - synchronize_irq(vector);
> free_irq(vector, &dev->cnq_array[i]);
> }
> }
> --
> 2.25.1
>
Thanks,
Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] qedr: Remove unnecessary synchronize_irq() before free_irq()
2022-05-13 8:16 [PATCH] qedr: Remove unnecessary synchronize_irq() before free_irq() cgel.zte
2022-05-15 10:12 ` [EXT] " Michal Kalderon
@ 2022-05-17 11:54 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2022-05-17 11:54 UTC (permalink / raw)
To: cgel.zte
Cc: mkalderon, aelior, leon, linux-rdma, linux-kernel, Minghao Chi,
Zeal Robot
On Fri, May 13, 2022 at 08:16:47AM +0000, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Calling synchronize_irq() right before free_irq() is quite useless. On one
> hand the IRQ can easily fire again before free_irq() is entered, on the
> other hand free_irq() itself calls synchronize_irq() internally (in a race
> condition free way), before any state associated with the IRQ is freed.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
> ---
> drivers/infiniband/hw/qedr/main.c | 1 -
> 1 file changed, 1 deletion(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-17 11:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-13 8:16 [PATCH] qedr: Remove unnecessary synchronize_irq() before free_irq() cgel.zte
2022-05-15 10:12 ` [EXT] " Michal Kalderon
2022-05-17 11:54 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).