From: Simon Horman <horms@kernel.org>
To: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Subject: Re: [PATCH iwl-net v2 3/4] ixgbe: Restore previous XDP program on ixgbe_setup_tc() failure
Date: Fri, 25 Sep 2026 18:23:51 +0100 [thread overview]
Message-ID: <20260925172351.GU13925@horms.kernel.org> (raw)
In-Reply-To: <20260922113558.2288111-4-sergey.temerkhanov@intel.com>
On Tue, Sep 22, 2026 at 11:35:57AM +0000, Sergey Temerkhanov wrote:
> When enabling or disabling an XDP program requires a queue
> reconfiguration, ixgbe_xdp_setup() swaps in the new program with
> xchg() before calling ixgbe_setup_tc(). If ixgbe_setup_tc() fails,
> the adapter was left pointing at the new program even though the
> reconfiguration did not complete, leaking the reference to the old
> program and leaving inconsistent state.
>
> ixgbe_setup_tc() may have already reconfigured the queues for the new
> program before failing. The XDP ring layout then no longer matches the
> previous program, for example when removing a program has removed the
> XDP TX rings. Restore the previous program and rebuild the queues for
> it so adapter->xdp_prog remains consistent with the ring configuration.
> Otherwise, a later open could run XDP without XDP TX rings and
> dereference a NULL ring. ixgbe_setup_tc() handles the device having
> been left down by the failed reconfiguration.
>
> Fixes: 3fe1d0a48d21 ("ixgbe: XDP: fix checker warning from rcu pointer")
> Signed-off-by: Sergey Temerkhanov <sergey.temerkhanov@intel.com>
> Reviewed-by: Przemyslaw Korba <przemyslaw.korba@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2026-09-25 17:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 11:35 [PATCH iwl-net v2 0/4] ixgbe: fix FCoE/XDP issues and PCI reset handling Sergey Temerkhanov
2026-09-22 11:35 ` [PATCH iwl-net v2 1/4] ixgbe: Refactor device operations to check whether netdev is available Sergey Temerkhanov
2026-09-25 17:22 ` Simon Horman
2026-09-22 11:35 ` [PATCH iwl-net v2 2/4] ixgbe: Fix FCoE refcount taking for unsupported adapters Sergey Temerkhanov
2026-09-25 17:23 ` Simon Horman
2026-09-22 11:35 ` [PATCH iwl-net v2 3/4] ixgbe: Restore previous XDP program on ixgbe_setup_tc() failure Sergey Temerkhanov
2026-09-25 17:23 ` Simon Horman [this message]
2026-09-22 11:35 ` [PATCH iwl-net v2 4/4] ixgbe: Implement PCI reset handler Sergey Temerkhanov
2026-09-25 17:24 ` 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=20260925172351.GU13925@horms.kernel.org \
--to=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=sergey.temerkhanov@intel.com \
/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