Netdev Archive on
help / color / mirror / Atom feed
From: "Nguyen, Anthony L" <>
To: "" <>,
Cc: "" <>,
	"Loktionov, Aleksandr" <>,
	"Fijalkowski, Maciej" <>,
	"Dziedziuch, SylwesterX" <>,
	"" <>,
	"Brandeburg, Jesse" <>,
	"" <>
Subject: Re: [PATCH 1/1] i40e: Avoid double IRQ free on error path in probe()
Date: Mon, 30 Aug 2021 20:52:41 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, 2021-08-26 at 17:19 -0500, PJ Waskiewicz wrote:
> This fixes an error path condition when probe() fails due to the
> default VSI not being available or online yet in the firmware. If
> that happens, the previous teardown path would clear the interrupt
> scheme, which also freed the IRQs with the OS. Then the error path
> for the switch setup (pre-VSI) would attempt to free the OS IRQs
> as well.

Hi PJ,

These comments are from the i40e team.

Yes in case we fail and go to err_vsis label in i40e_probe() we will
call i40e_reset_interrupt_capability twice but this is not a problem.
This is because pci_disable_msi/pci_disable_msix will be called only if
appropriate flags are set on PF and if this function is called ones it
will clear those flags. So even if we call
i40e_reset_interrupt_capability twice we will not disable msi vectors

The issue here is different however. It is failing in free_irq because
we are trying to free already free vector. This is because setup of
misc irq vectors in i40e_probe is done after i40e_setup_pf_switch. If
i40e_setup_pf_switch fails then we will jump to err_vsis and call
i40e_clear_interrupt_scheme which will try to free those misc irq
vectors which were not yet allocated. We should have the proper fix for
this ready soon.

  reply	other threads:[~2021-08-30 20:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 22:19 [PATCH 1/1] i40e: Avoid double IRQ free on error path in probe() PJ Waskiewicz
2021-08-30 20:52 ` Nguyen, Anthony L [this message]
2021-08-31 20:58   ` PJ Waskiewicz
2021-09-13 19:37     ` PJ Waskiewicz
2021-09-13 20:29       ` Nguyen, Anthony L
2021-09-14  8:23         ` Dziedziuch, SylwesterX
2021-09-14 21:40           ` PJ Waskiewicz
2021-09-15  9:53             ` Dziedziuch, SylwesterX
2021-09-18  2:01               ` PJ Waskiewicz
2021-09-20  7:48                 ` Dziedziuch, SylwesterX
2021-09-21 17:06                   ` PJ Waskiewicz
2021-09-23 15:17                     ` PJ Waskiewicz
2021-09-24  7:04                       ` Dziedziuch, SylwesterX
  -- strict thread matches above, loose matches on Subject: below --
2021-08-25 19:23 PJ Waskiewicz
2021-08-26  8:03 ` Maciej Fijalkowski
2021-08-26 14:26   ` PJ Waskiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).