This is a note to let you know that I've just added the patch titled idpf: Acquire the lock before accessing the xn->salt to the 6.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: idpf-acquire-the-lock-before-accessing-the-xn-salt.patch and it can be found in the queue-6.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 70ff0049d534a037450c5d80e0d683a4d8f7a2fd Author: Manoj Vishwanathan <manojvishy@xxxxxxxxxx> Date: Mon Dec 16 16:27:33 2024 +0000 idpf: Acquire the lock before accessing the xn->salt [ Upstream commit d15fe4edd7decdf14d8ad2b78df100ea23302065 ] The transaction salt was being accessed before acquiring the idpf_vc_xn_lock when idpf has to forward the virtchnl reply. Fixes: 34c21fa894a1 ("idpf: implement virtchnl transaction manager") Signed-off-by: Manoj Vishwanathan <manojvishy@xxxxxxxxxx> Signed-off-by: David Decotigny <decot@xxxxxxxxxx> Signed-off-by: Brian Vazquez <brianvv@xxxxxxxxxx> Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx> Reviewed-by: Pavan Kumar Linga <pavan.kumar.linga@xxxxxxxxx> Tested-by: Krishneil Singh <krishneil.k.singh@xxxxxxxxx> Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c index 7639d520b8063..99bdb95bf2266 100644 --- a/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c +++ b/drivers/net/ethernet/intel/idpf/idpf_virtchnl.c @@ -612,14 +612,15 @@ idpf_vc_xn_forward_reply(struct idpf_adapter *adapter, return -EINVAL; } xn = &adapter->vcxn_mngr->ring[xn_idx]; + idpf_vc_xn_lock(xn); salt = FIELD_GET(IDPF_VC_XN_SALT_M, msg_info); if (xn->salt != salt) { dev_err_ratelimited(&adapter->pdev->dev, "Transaction salt does not match (%02x != %02x)\n", xn->salt, salt); + idpf_vc_xn_unlock(xn); return -EINVAL; } - idpf_vc_xn_lock(xn); switch (xn->state) { case IDPF_VC_XN_WAITING: /* success */