From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f50.google.com (mail-pg0-f50.google.com [74.125.83.50]) by dpdk.org (Postfix) with ESMTP id 099697D8E for ; Mon, 21 Aug 2017 11:34:36 +0200 (CEST) Received: by mail-pg0-f50.google.com with SMTP id m133so14705635pga.5 for ; Mon, 21 Aug 2017 02:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=d8ClSwTjgt/pGNINvGLwVkLLAL+jhJjk3FxKvr7iGCI=; b=pSOP6GymMi3G/1dqVnMBmXzA5pIJM2JZf2PP6U5zOa3aujil8obf9T4Z5uWN5e+po7 B/6BKbC2xXAQg4B5c6MINDCB5WNyxrG8AEAcKaTQWpoodYWZircSeVP2G7aUKjN1WeTm cIpJPfw+srSRuiv4+kmeN48htaYUHbcGa6ZZF3Q4O6kjLW3CvmoRRGNnSO/WnE0YBDDt +KoL28jieaAXhwUyUIn/9oJ8K/qvbec+hwn/mC9UedNX8zV+p/QiKfBtMrfSfGW5PI40 ODFlxdKWzj2QbPg2UIoDH+Fh1cVkXC4BuNCiCUu2OY/+SFvqBBuB9fRRza+5uaGSg8Vn ElAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=d8ClSwTjgt/pGNINvGLwVkLLAL+jhJjk3FxKvr7iGCI=; b=kKveBY/vNLGA3cAh6QF0D6kHYmsrSTwcIztHxW3h4asiUbI8cArzAZxBoWdAERJsnX dW4wrldYtEpFVh5IcmkqEOvFidOGDKUWeyIjw0eS9SmRYUN1w0ksa0PnsKeFr/04t5jG Ls6aM82ATEe1B50c3Ig1OWhuzxDNJhWrv4rzXdW8elaxAVouUcKI1i5rW4qdPi6eAzK0 D2Ke9A3uxiFVPBNVzKd/4r3btvK+ISBQp4959uJwdSF87dzVWjCQRjOoj5tt3EUq5FTp yyEEAd1W0kaZq92xZogDIwwUW1UzgMXhG59PSDCMs1C3o/HSSCKMaVSCIy+ARgu1xSnq CXMw== X-Gm-Message-State: AHYfb5h24SCxhn27FEDTxbVsq2c9SibYMvujz4kUDdAIgmi1VZ51So7/ HcGxqd9pzJ4wkkMr X-Received: by 10.84.131.105 with SMTP id 96mr18276918pld.226.1503308075344; Mon, 21 Aug 2017 02:34:35 -0700 (PDT) Received: from localhost.localdomain ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id 69sm23355087pfh.186.2017.08.21.02.34.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Aug 2017 02:34:34 -0700 (PDT) From: Yuanhan Liu To: Pablo de Lara Cc: Declan Doherty , dpdk stable , Yuanhan Liu Date: Mon, 21 Aug 2017 17:30:32 +0800 Message-Id: <1503307878-16728-18-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> References: <1503307878-16728-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'crypto/aesni_mb: fix possible crypto job leak' has been queued to stable release 17.05.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2017 09:34:36 -0000 Hi, FYI, your patch has been queued to stable release 17.05.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From e2b2c7022f07472e77b816f615420553160589c5 Mon Sep 17 00:00:00 2001 From: Pablo de Lara Date: Thu, 13 Jul 2017 04:35:12 +0100 Subject: [PATCH] crypto/aesni_mb: fix possible crypto job leak [ upstream commit 7c95d47c1ead28b7ffa0fc77e33d76b014c9511e ] When dequeueing operations from an AESNI-MB device, crypto jobs are dequeued from the internal scheduler in the Multi-buffer library. If the number of jobs available to retrieve are higher than the number of crypto operations that are required, then an extra job is retrieved (due to an incorrect conditional), but not used. This leads to a job leak and the operation associated to that job will not be ever dequeued. Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue") Signed-off-by: Pablo de Lara Acked-by: Declan Doherty --- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 43e4865..9d40a9f 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -565,7 +565,7 @@ handle_completed_jobs(struct aesni_mb_qp *qp, JOB_AES_HMAC *job, struct rte_crypto_op *op = NULL; unsigned processed_jobs = 0; - while (job != NULL && processed_jobs < nb_ops) { + while (job != NULL) { op = post_process_mb_job(qp, job); if (op) { @@ -575,6 +575,8 @@ handle_completed_jobs(struct aesni_mb_qp *qp, JOB_AES_HMAC *job, qp->stats.dequeue_err_count++; break; } + if (processed_jobs == nb_ops) + break; job = (*qp->op_fns->job.get_completed_job)(&qp->mb_mgr); } -- 2.7.4