Commit 8e2a2420 authored by Emil Tantilov's avatar Emil Tantilov Committed by Tony Nguyen
Browse files

idpf: set the payload size before calling the async handler



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: 34c21fa8 ("idpf: implement virtchnl transaction manager")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Reviewed-by: default avatarAleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: default avatarLi Li <boolli@google.com>
Acked-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: default avatarSamuel Salin <Samuel.salin@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent d086fae6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;