From patchwork Mon Mar 25 14:37:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fan Zhang X-Patchwork-Id: 51633 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EFD562BFA; Mon, 25 Mar 2019 15:39:47 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 303DE2BF4; Mon, 25 Mar 2019 15:39:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Mar 2019 07:39:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,269,1549958400"; d="scan'208";a="310251070" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.136]) by orsmga005.jf.intel.com with ESMTP; 25 Mar 2019 07:39:43 -0700 From: Fan Zhang To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, Fan Zhang , stable@dpdk.org Date: Mon, 25 Mar 2019 14:37:31 +0000 Message-Id: <20190325143731.6488-1-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.14.5 Subject: [dpdk-dev] [PATCH] vhost/crypto: fix coverity issues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: cd1e8f03abf0 ("vhost/crypto: fix packet copy in chaining mode") Coverity Issue: 277214 Coverity Issue: 277220 Coverity Issue: 277233 Coverity Issue: 277236 Cc: stable@dpdk.org Signed-off-by: Fan Zhang Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost_crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index 9b4b850e8..0edf12d52 100644 --- a/lib/librte_vhost/vhost_crypto.c +++ b/lib/librte_vhost/vhost_crypto.c @@ -1109,7 +1109,7 @@ prepare_sym_chain_op(struct vhost_crypto *vcrypto, struct rte_crypto_op *op, if (unlikely(copy_data(digest_addr, vc_req, &digest_desc, chain->para.hash_result_len, - nb_descs, vq_size)) < 0) { + nb_descs, vq_size) < 0)) { ret = VIRTIO_CRYPTO_BADMSG; goto error_exit; } @@ -1627,7 +1627,7 @@ rte_vhost_crypto_fetch_requests(int vid, uint32_t qid, op->sym->m_src->data_off = 0; if (unlikely(vhost_crypto_process_one_req(vcrypto, vq, - op, head, desc_idx)) < 0) + op, head, desc_idx) < 0)) break; }