[PATCH net] sfc: siena: use reset_work in efx_siena_sriov_reset_vf_work()
From: Ziheng Wei
Date: Thu Dec 03 2026 - 22:12:02 EST
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@xxxxxxxxxxxxxxx
Signed-off-by: Ziheng Wei <zihengw03@xxxxxxx>
---
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