All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [PATCH RESEND] i40e: Remove unnecessary synchronize_irq() before free_irq()
@ 2022-05-18 21:31 Tony Nguyen
  2022-05-24 13:48 ` G, GurucharanX
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Nguyen @ 2022-05-18 21:31 UTC (permalink / raw)
  To: intel-wired-lan

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>
---
Resending due to mail issues with Intel Wired LAN

 drivers/net/ethernet/intel/i40e/i40e_main.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 83e0cf475ebd..797f61b2cd96 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -4162,7 +4162,6 @@ static void i40e_free_misc_vector(struct i40e_pf *pf)
 	i40e_flush(&pf->hw);
 
 	if (pf->flags & I40E_FLAG_MSIX_ENABLED && pf->msix_entries) {
-		synchronize_irq(pf->msix_entries[0].vector);
 		free_irq(pf->msix_entries[0].vector, pf);
 		clear_bit(__I40E_MISC_IRQ_REQUESTED, pf->state);
 	}
@@ -4901,7 +4900,6 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi)
 			irq_set_affinity_notifier(irq_num, NULL);
 			/* remove our suggested affinity mask for this IRQ */
 			irq_update_affinity_hint(irq_num, NULL);
-			synchronize_irq(irq_num);
 			free_irq(irq_num, vsi->q_vectors[i]);
 
 			/* Tear down the interrupt queue link list
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Intel-wired-lan] [PATCH RESEND] i40e: Remove unnecessary synchronize_irq() before free_irq()
  2022-05-18 21:31 [Intel-wired-lan] [PATCH RESEND] i40e: Remove unnecessary synchronize_irq() before free_irq() Tony Nguyen
@ 2022-05-24 13:48 ` G, GurucharanX
  0 siblings, 0 replies; 2+ messages in thread
From: G, GurucharanX @ 2022-05-24 13:48 UTC (permalink / raw)
  To: intel-wired-lan



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Thursday, May 19, 2022 3:01 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Zeal Robot <zealci@zte.com.cn>; Minghao Chi
> <chi.minghao@zte.com.cn>
> Subject: [Intel-wired-lan] [PATCH RESEND] i40e: Remove unnecessary
> synchronize_irq() before free_irq()
> 
> 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>
> ---
> Resending due to mail issues with Intel Wired LAN
> 
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 --
>  1 file changed, 2 deletions(-)
> 

Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-24 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 21:31 [Intel-wired-lan] [PATCH RESEND] i40e: Remove unnecessary synchronize_irq() before free_irq() Tony Nguyen
2022-05-24 13:48 ` G, GurucharanX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.