All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	Elkin Cruz <elkin@google.com>
Subject: Re: [PATCH iwl-net] i40e: ensure owner VSI is found before dereferencing in i40e_veb_release()
Date: Sat, 28 Nov 2026 14:22:17 +0000	[thread overview]
Message-ID: <20261128142217.GG31322@horms.kernel.org> (raw)
In-Reply-To: <20261119170741.1525395-1-irogers@google.com>

On Thu, Nov 19, 2026 at 09:07:41AM -0800, Ian Rogers wrote:
> i40e_veb_release() counts all VSIs attached to veb->seid in 'n', but only
> assigns 'vsi' when I40E_VSI_FLAG_VEB_OWNER is set. If a non-floating VEB
> has a single remaining VSI without I40E_VSI_FLAG_VEB_OWNER (for example
> if the owner VSI was moved or cleared via debugfs switch operations),
> n == 1 passes the 'n != 1' check while 'vsi' remains uninitialized on the
> stack and is immediately dereferenced.
> 
> Initialize 'vsi' to NULL and refuse to release a non-floating VEB unless
> both n == 1 and vsi != NULL.
> 
> Found via an x86_64 LLVM=1 (Clang 21.1.8) allyesconfig audit with
> -Wconditional-uninitialized enabled; fix and changelog drafted with an AI
> coding assistant. Build-tested under LLVM=1 W=1 (-Werror) and
> -Wconditional-uninitialized; not tested on Intel XL710/X722 hardware.
> 
> Fixes: 08cdde310e22 ("i40e: Fix broken support for floating VEBs")
> Signed-off-by: Ian Rogers <irogers@google.com>

Reviewed-by: Simon Horman <horms@kernel.org>


      reply	other threads:[~2026-11-28 14:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 17:07 [PATCH iwl-net] i40e: ensure owner VSI is found before dereferencing in i40e_veb_release() Ian Rogers
2026-11-28 14:22 ` Simon Horman [this message]

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=20261128142217.GG31322@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=elkin@google.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=irogers@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@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 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.