Netdev List
 help / color / mirror / Atom feed
From: "Austin, Alex (DCCG)" <alex.austin@amd.com>
To: Ziheng Wei <zihengw03@163.com>,
	Andy Moreton <andy.moreton@amd.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>
Cc: netdev@vger.kernel.org, linux-net-drivers@amd.com,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH net] sfc: siena: use reset_work in efx_siena_sriov_reset_vf_work()
Date: Fri, 4 Dec 2026 10:02:36 +0000	[thread overview]
Message-ID: <34b0c554-af90-41e4-afce-a8e992adf1bc@amd.com> (raw)
In-Reply-To: <20261204031110.1758569-1-zihengw03@163.com>



On 04/12/2026 03:11, Ziheng Wei wrote:
> 
> efx_siena_sriov_reset_vf_work() is initialized on vf->reset_work via
> INIT_WORK(&vf->reset_work, efx_siena_sriov_reset_vf_work), but computes
> vf using container_of(work, struct siena_vf, req) instead.
> 
> When the work item runs, container_of() computes a mis-offset struct
> siena_vf pointer, causing vf->efx to read an unrelated field instead of
> the real struct efx_nic pointer and triggering an invalid pointer
> dereference and kernel oops in efx_siena_alloc_buffer().
> 
> Use the matching reset_work member in container_of().
> 
> Found by LLM-assisted static analysis. Compile-tested on x86_64.
> 
> Fixes: cd2d5b529cdb ("sfc: Add SR-IOV back-end support for SFC9000 family")
> Cc: stable@vger.kernel.org
> Signed-off-by: Ziheng Wei <zihengw03@163.com>
> ---
>  drivers/net/ethernet/sfc/siena/siena_sriov.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/sfc/siena/siena_sriov.c b/drivers/net/ethernet/sfc/siena/siena_sriov.c
> index df7157275..6178d03fc 100644
> --- a/drivers/net/ethernet/sfc/siena/siena_sriov.c
> +++ b/drivers/net/ethernet/sfc/siena/siena_sriov.c
> @@ -1007,7 +1007,7 @@ static void efx_siena_sriov_reset_vf(struct siena_vf *vf,
> 
>  static void efx_siena_sriov_reset_vf_work(struct work_struct *work)
>  {
> -       struct siena_vf *vf = container_of(work, struct siena_vf, req);
> +       struct siena_vf *vf = container_of(work, struct siena_vf, reset_work);
>         struct efx_nic *efx = vf->efx;
>         struct efx_buffer buf;
> 
> 
> base-commit: 97d73c8251226cf27cc6656b4c542869bb8c69fa
> --
> 2.43.0

Reviewed-by: Alex Austin <alex.austin@amd.com>

      reply	other threads:[~2026-12-04 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  3:11 [PATCH net] sfc: siena: use reset_work in efx_siena_sriov_reset_vf_work() Ziheng Wei
2026-12-04 10:02 ` Austin, Alex (DCCG) [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=34b0c554-af90-41e4-afce-a8e992adf1bc@amd.com \
    --to=alex.austin@amd.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andy.moreton@amd.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=zihengw03@163.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