From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5BB814594A; Mon, 9 Sep 2024 18:48:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3394D40ED8; Mon, 9 Sep 2024 18:48:45 +0200 (CEST) Received: from xmbghk7.mail.qq.com (xmbghk7.mail.qq.com [43.163.128.50]) by mails.dpdk.org (Postfix) with UTF8SMTP id F298340ED0 for ; Mon, 9 Sep 2024 18:48:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1725900515; bh=Wu8X3eV2Lg0cDx3fRZSrqxXrwdxmVyTQ+AZkY+7fsqo=; h=From:To:Cc:Subject:Date; b=YbUAlmkkfxjUDsMm0xwF/3t91HbzTIdtLjVGTjdnWLYtBlWlyJUXBhoXSUntq4Xhj FbF65NWJoQg1tqtX/HDLVko2br3GDac2UACqbtCwKj3vMqBqBCcFIQJkFbmZAseeC7 6YWgZmv03dTL6anqxc/6TQAsycUfQ784kr/zaGR4= Received: from localhost.localdomain ([113.104.214.202]) by newxmesmtplogicsvrsza29-0.qq.com (NewEsmtp) with SMTP id C220FEF6; Tue, 10 Sep 2024 00:48:34 +0800 X-QQ-mid: xmsmtpt1725900514tyvxyj34b Message-ID: X-QQ-XMAILINFO: OaubouGXmhNzHLRAVvTl9i9/a9M6hRzYrdG7PFX24zOxmyoFIsf1dSSGbx8koF aw7bb/clnWQOu2/dQlpv4TaZANOzz5pT3FHqnQDb08YmK9lm1TD42SLDFZ3H31CX4w3ONK6CRuSa qzajBjw03mnokwPwV2BEt6bV4d+igvM3hnBW2L3hKIe22LFZv3WvwaCpKCsMMNj4vlrAyPUtXnW+ gRYEpXKF4q9x2xaJE7dbo0bhgpyEcbbl/pMV52IOn8IXRLLkCcAxGdYqFF5DYZtcx5rAz/4OBMwP KwDCOZ41jiriUpKfy8KKit6TmiDLx6Om+N15dVhdAJGpai4xIjHHmAGMtR+CZusck1ukqPMcS6v3 QSBIXRe+CCSXFcQRIIxsZ2P4TMixn42gGNUwRJN+QrAW4+8BOfiRzwZ8GKnp9fjCfH3zIWBfmcEP /hFDQso11P3l96ApLMnqI74u+fOAGz03pV5OD/QsctmOoWsQZWb6Uvz4s+7Qt39DDlSVvMPnyyak sfsD1qQSNsdxoFh6NvyJiOWlE/ONB9e4vKJ9WLcPRFhLYfkQOfy4gCRQoKXyRV81If35Pb2P5QCz jq8fat6W/w7RlIzStKaufcTiQ3WGj08Af73F9EqKHv2opNIwcbVSirlgZNTFrasrcfvqanliaNZy izHXLFXuBzfGRlf0WarLHqgCY6QXXy+Rj09soIxAAWczO4pK0TwCekR2K5S8DOxZHFVnAHoFkbio 0vIJZH74N8kZvdWLAiK7BlVpbFY30AhSUYcT2m8oNK0rDScxbouVcIIMTJczzKAM5xAfrR6P1Wmb TC+RoG2R1GFdRVqvwCEwrfxaevel+y1HkQuEurkzoOlst/40GYOFRcN2VB/mYWGYeivkm3LAFGc8 zG5/1SfrvuOXCQPicnoxQjlbteIbBbG8dAmlQg/WLNqWOpAqghOeonw5wAhTUMBZ+GgIDuzpTrVf zSWlMTnzQJsKudEO7NmjbRnTyXpdET9bwrp8eVjyRUWXpsJLroLiCi7MRY0o56kUqY4+fu3MjpGt 9/iiabs/bgW/HBK/YK+vm0KOVtfbI= X-QQ-XMRINFO: MSVp+SPm3vtS1Vd6Y4Mggwc= From: Yong Liang <1269690261@qq.com> To: kai.ji@intel.com Cc: dev@dpdk.org Subject: [PATCH] Coverity issue: Failure to enqueue packets for cryptodev-scheduler_multicore can lead to program crashes Bugzilla ID: 1537 Fixes: replace `pending_deq_ops` with `pending_enq_ops` Cc: stable@dpdk.org Date: Tue, 10 Sep 2024 00:48:22 +0800 X-OQ-MSGID: <20240909164822.2298-1-1269690261@qq.com> X-Mailer: git-send-email 2.46.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Signed-off-by: Yong Liang <1269690261@qq.com> --- drivers/crypto/scheduler/scheduler_multicore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/scheduler/scheduler_multicore.c b/drivers/crypto/scheduler/scheduler_multicore.c index a21b522f9f..70f8a25b70 100644 --- a/drivers/crypto/scheduler/scheduler_multicore.c +++ b/drivers/crypto/scheduler/scheduler_multicore.c @@ -191,11 +191,11 @@ mc_scheduler_worker(struct rte_cryptodev *dev) worker->qp_id, &enq_ops[pending_enq_ops_idx], pending_enq_ops); - if (processed_ops < pending_deq_ops) + if (processed_ops < pending_enq_ops) scheduler_retrieve_sessions( &enq_ops[pending_enq_ops_idx + processed_ops], - pending_deq_ops - processed_ops); + pending_enq_ops - processed_ops); pending_enq_ops -= processed_ops; pending_enq_ops_idx += processed_ops; inflight_ops += processed_ops; -- 2.46.0.windows.1