vhost/crypto: fix missing head correction

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>
This commit is contained in:
Fan Zhang 2018-04-27 14:52:33 +01:00 committed by Thomas Monjalon
parent dfdf4b84b8
commit d4cc4c65df

View 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;
}