]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
idpf: set the payload size before calling the async handler
authorEmil Tantilov <emil.s.tantilov@intel.com>
Thu, 19 Mar 2026 21:13:35 +0000 (14:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Apr 2026 08:46:46 +0000 (10:46 +0200)
commit 8e2a2420e267a515f6db56a6e9570b5cacd92919 upstream.

Set the payload size before forwarding the reply to the async handler.
Without this, xn->reply_sz will be 0 and idpf_mac_filter_async_handler()
will never get past the size check.

Fixes: 34c21fa894a1 ("idpf: implement virtchnl transaction manager")
Cc: stable@vger.kernel.org
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Li Li <boolli@google.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Samuel Salin <Samuel.salin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

index 0af93bc3e6bd7b5186d969eb6342f2c0e5c7f2f8..3c8ceff0e669f166a2408ab9fbe1f4a380743b90 100644 (file)
@@ -612,6 +612,10 @@ idpf_vc_xn_forward_reply(struct idpf_adapter *adapter,
                err = -ENXIO;
                goto out_unlock;
        case IDPF_VC_XN_ASYNC:
+               /* Set reply_sz from the actual payload so that async_handler
+                * can evaluate the response.
+                */
+               xn->reply_sz = ctlq_msg->data_len;
                err = idpf_vc_xn_forward_async(adapter, xn, ctlq_msg);
                idpf_vc_xn_unlock(xn);
                return err;