vhost/crypto: fix missing head correction
authorFan Zhang <roy.fan.zhang@intel.com>
Fri, 27 Apr 2018 13:52:33 +0000 (14:52 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 27 Apr 2018 17:49:07 +0000 (19:49 +0200)
This patch fixes the missing head descriptor correction for
indirect descriptors.

Fixes: 0aee2428419f ("vhost/crypto: move to safe GPA translation API")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost_crypto.c

index c6fb2fe..620a1df 100644 (file)
@@ -919,6 +919,7 @@ vhost_crypto_process_one_req(struct vhost_crypto *vcrypto,
                if (unlikely(!desc || dlen != head->len))
                        return -1;
                desc_idx = 0;
+               head = desc;
        } else {
                desc = head;
        }