]> git.ipfire.org Git - thirdparty/kernel/linux.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)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 6 Apr 2026 20:39:15 +0000 (13:39 -0700)
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>
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

index fbd5a15b015c4077c133b6efa00e1da7f74a9d45..be66f9b2e101cae0374af569fdccd5c2d48bb171 100644 (file)
@@ -615,6 +615,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;