From: Simon Horman <horms@kernel.org>
To: aleksandr.loktionov@intel.com
Cc: 'Simon Horman' <horms@kernel.org>,
intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,
netdev@vger.kernel.org, kiran.patil@intel.com
Subject: Re: [PATCH iwl-net 2/5] iavf: fix error path in iavf_request_misc_irq
Date: Wed, 15 Apr 2026 14:26:11 +0100 [thread overview]
Message-ID: <20260415132610.803526-2-horms@kernel.org> (raw)
In-Reply-To: <20260413073035.4082204-3-aleksandr.loktionov@intel.com>
From: 'Simon Horman' <horms@kernel.org>
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
Full review at: https://sashiko.dev
---
iavf: fix error path in iavf_request_misc_irq
This patch drops the free_irq() call from the error path of
iavf_request_misc_irq() when request_irq() fails. This is intended to
prevent a kernel warning when freeing an unrequested vector.
> diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
> index dad001abc9086..ab5f5adc2d3c2 100644
> --- a/drivers/net/ethernet/intel/iavf/iavf_main.c
> +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
> @@ -587,7 +587,6 @@ static int iavf_request_misc_irq(struct iavf_adapter *adapter)
> dev_err(&adapter->pdev->dev,
> "request_irq for %s failed: %d\n",
> adapter->misc_vector_name, err);
> - free_irq(adapter->msix_entries[0].vector, netdev);
Does this patch completely fix the warning?
If request_irq() fails, iavf_request_misc_irq() returns an error but leaves
adapter->msix_entries allocated.
In caller error handling paths like iavf_disable_vf() which clean up after a
failure, iavf_free_misc_irq() is called:
static void iavf_free_misc_irq(struct iavf_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
if (!adapter->msix_entries)
return;
free_irq(adapter->msix_entries[0].vector, netdev);
}
Since adapter->msix_entries is still allocated, the check passes and free_irq()
is called on the unrequested vector anyway, triggering the exact same warning.
Does the driver need to explicitly track whether the IRQ was successfully
requested?
> }
> return err;
> }
next prev parent reply other threads:[~2026-04-15 13:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 7:30 [PATCH iwl-net 0/5] iavf: five correctness fixes Aleksandr Loktionov
2026-04-13 7:30 ` [PATCH iwl-net 1/5] iavf: fix null pointer dereference in iavf_detect_recover_hung Aleksandr Loktionov
2026-04-15 12:48 ` Simon Horman
2026-04-13 7:30 ` [PATCH iwl-net 2/5] iavf: fix error path in iavf_request_misc_irq Aleksandr Loktionov
2026-04-13 11:53 ` Przemek Kitszel
2026-04-15 13:26 ` Simon Horman [this message]
2026-04-13 7:30 ` [PATCH iwl-net 3/5] iavf: prevent VSI corruption when ring params changed during reset Aleksandr Loktionov
2026-04-15 13:28 ` Simon Horman
2026-04-13 7:30 ` [PATCH iwl-net 4/5] iavf: fix TC boundary check in iavf_handle_tclass Aleksandr Loktionov
2026-04-15 13:46 ` Simon Horman
2026-04-13 7:30 ` [PATCH iwl-net 5/5] iavf: return 0 when TC flower filter not found after qdisc teardown Aleksandr Loktionov
2026-04-15 13:53 ` Simon Horman
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260415132610.803526-2-horms@kernel.org \
--to=horms@kernel.org \
--cc=aleksandr.loktionov@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kiran.patil@intel.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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